commit 9b4f0a49f7fa723db9b5e11893173172f85b749c
Author: Srivatsa S. Bhat <srivatsa@csail.mit.edu>
Date:   Tue Aug 14 11:36:04 2018 -0700

    Fix build warnings/errors with gcc 7.3

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/statistics.h:17:0,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/stop_watch.h:8,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/perf_step_timer.h:9,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/iostats_context_imp.h:8,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/posix_logger.h:27,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/port/util_logger.h:18,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/db/auto_roll_logger.h:15,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/db/auto_roll_logger.cc:6:
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_local.h:205:5: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
     #if ROCKSDB_SUPPORT_THREAD_LOCAL
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_local.h:205:5: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_local.h:205:5: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_local.h:66:16: error: 'function' in namespace 'std' does not name a template type
       typedef std::function<void(void*, void*)> FoldFunc;
                    ^~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_local.h:71:13: error: 'FoldFunc' has not been declared
       void Fold(FoldFunc func, void* res);
                 ^~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_local.h:142:28: error: 'FoldFunc' has not been declared
         void Fold(uint32_t id, FoldFunc func, void* res);
                                ^~~~~~~~

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_status_updater.h:42:0,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_status_util.h:13,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/db/builder.cc:34:
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/thread_operation.h:22:5: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
     #if ROCKSDB_USING_THREAD_STATUS
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/db/memtable.cc: In member function 'void rocksdb::MemTable::Update(rocksdb::SequenceNumber, const rocksdb::Slice&, const rocksdb::Slice&)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/db/memtable.cc:734:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
               }
               ^
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/db/memtable.cc:736:9: note: here
             default:
             ^~~~~~~

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/librbd/WatchNotifyTypes.cc:5:0:
    /usr/src/photon/BUILD/ceph-11.2.1/src/librbd/WatchNotifyTypes.h: In member function 'void librbd::watch_notify::NotifyMessage::decode(ceph::buffer::list::iterator&)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/librbd/WatchNotifyTypes.h:246:8: warning: '<anonymous>.librbd::watch_notify::SnapRenamePayload::snap_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
     struct SnapRenamePayload : public SnapPayloadBase {
            ^~~~~~~~~~~~~~~~~

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/cls/rbd/cls_rbd_types.cc:5:0:
    /usr/src/photon/BUILD/ceph-11.2.1/src/cls/rbd/cls_rbd_types.h: In member function 'void cls::rbd::SnapshotNamespaceOnDisk::decode(ceph::buffer::list::iterator&)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/cls/rbd/cls_rbd_types.h:244:8: warning: '<anonymous>.cls::rbd::GroupSnapshotNamespace::group_pool' may be used uninitialized in this function [-Wmaybe-uninitialized]
     struct GroupSnapshotNamespace {
            ^~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/cls/rbd/cls_rbd_types.h:244:8: warning: '<anonymous>.cls::rbd::GroupSnapshotNamespace::group_pool' may be used uninitialized in this function [-Wmaybe-uninitialized]
     struct GroupSnapshotNamespace {
            ^~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/cls/rbd/cls_rbd_types.h:244:8: warning: '*((void*)(& temp)+8).cls::rbd::GroupSnapshotNamespace::group_pool' may be used uninitialized in this function [-Wmaybe-uninitialized]
     struct GroupSnapshotNamespace {
            ^~~~~~~~~~~~~~~~~~~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/krbd.cc: In function 'int krbd_unmap_by_spec(krbd_ctx*, const char*, const char*, const char*, const char*)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/krbd.cc:610:65: warning: 'devno' may be used uninitialized in this function [-Wmaybe-uninitialized]
       return do_unmap(ctx->udev, devno, build_unmap_buf(id, options));
                                                                     ^
    /usr/src/photon/BUILD/ceph-11.2.1/src/krbd.cc:593:9: note: 'devno' was declared here
       dev_t devno;
             ^~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/logging.cc: In function 'std::__cxx11::string rocksdb::NumberToHumanString(int64_t)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/logging.cc:100:13: error: '%li' directive output may be truncated writing between 1 and 17 bytes into a region of size 16 [-Werror=format-truncation=] 
     std::string NumberToHumanString(int64_t num) {
                 ^~~~~~~~~~~~~~~~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc: In function 'uint64_t MurmurHash64A(const void*, int, unsigned int)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:49:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 7: h ^= ((uint64_t)data2[6]) << 48;
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:50:5: note: here
         case 6: h ^= ((uint64_t)data2[5]) << 40;
         ^~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:50:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 6: h ^= ((uint64_t)data2[5]) << 40;
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:51:5: note: here
         case 5: h ^= ((uint64_t)data2[4]) << 32;
         ^~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:51:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 5: h ^= ((uint64_t)data2[4]) << 32;
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:52:5: note: here
         case 4: h ^= ((uint64_t)data2[3]) << 24;
         ^~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:52:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 4: h ^= ((uint64_t)data2[3]) << 24;
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:53:5: note: here
         case 3: h ^= ((uint64_t)data2[2]) << 16;
         ^~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:53:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 3: h ^= ((uint64_t)data2[2]) << 16;
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:54:5: note: here
         case 2: h ^= ((uint64_t)data2[1]) << 8;
         ^~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:54:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case 2: h ^= ((uint64_t)data2[1]) << 8;
                 ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/murmurhash.cc:55:5: note: here
         case 1: h ^= ((uint64_t)data2[0]);
         ^~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/transaction_test_util.cc: In static member function 'static rocksdb::Status rocksdb::RandomTransactionInserter::Verify(rocksdb::DB*, uint16_t)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/transaction_test_util.cc:188:8: error: '__builtin___snprintf_chk' output may be truncated before the last format character [-Werror=format-truncation=]
     Status RandomTransactionInserter::Verify(DB* db, uint16_t num_sets) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/stdio.h:862:0,
                     from /usr/include/c++/7.3.0/cstdio:42,
                     from /usr/include/c++/7.3.0/ext/string_conversions.h:43,
                     from /usr/include/c++/7.3.0/bits/basic_string.h:6349,
                     from /usr/include/c++/7.3.0/string:52,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/include/rocksdb/options.h:14,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/transaction_test_util.h:10,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/util/transaction_test_util.cc:11:
    /usr/include/bits/stdio2.h:65:44: note: '__builtin___snprintf_chk' output between 5 and 6 bytes into a destination of size 5
            __bos (__s), __fmt, __va_arg_pack ());
                                                ^

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/persistent_cache/block_cache_tier.h:23:0,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/persistent_cache/block_cache_tier.cc:7:
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/persistent_cache/block_cache_tier_file.h:80:33: error: 'function' in namespace 'std' does not name a template type
                          const std::function<void()> callback) = 0;
                                     ^~~~~~~~

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/persistent_cache/volatile_tier_impl.h:18:0,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/persistent_cache/volatile_tier_impl.cc:8:
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/persistent_cache/hash_table_evictable.h:78:23: error: 'function' in namespace 'std' does not name a template type
       T* Evict(const std::function<void(T*)>& fn = nullptr) {
                           ^~~~~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/transactions/transaction_util.cc: In static member function 'static rocksdb::Status rocksdb::TransactionUtil::CheckKey(rocksdb::DBImpl*, rocksdb::SuperVersion*, rocksdb::SequenceNumber, rocksdb::SequenceNumber, const string&, bool)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/transactions/transaction_util.cc:53:8: error: '.  Increasing the value of the max_write_buffer_number_to_maintain option could reduce the frequency of this error.' directive output truncated writing 115 bytes into a region of size between 76 and 114 [-Werror=format-truncation=]
     Status TransactionUtil::CheckKey(DBImpl* db_impl, SuperVersion* sv,
            ^~~~~~~~~~~~~~~
    In file included from /usr/include/stdio.h:862:0,
                     from /usr/include/c++/7.3.0/cstdio:42,
                     from /usr/include/c++/7.3.0/ext/string_conversions.h:43,
                     from /usr/include/c++/7.3.0/bits/basic_string.h:6349,
                     from /usr/include/c++/7.3.0/string:52,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/transactions/transaction_util.h:10,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rocksdb/utilities/transactions/transaction_util.cc:12:
    /usr/include/bits/stdio2.h:65:44: note: '__builtin___snprintf_chk' output between 257 and 295 bytes into a destination of size 255
            __bos (__s), __fmt, __va_arg_pack ());

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_formats.cc:20:0:
    /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_formats.h: In constructor 'RGWFormatter_Plain::RGWFormatter_Plain(bool)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_formats.h:60:8: warning: 'RGWFormatter_Plain::wrote_something' will be initialized after [-Wreorder]
       bool wrote_something;
            ^~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_formats.h:58:10: warning:   'size_t RGWFormatter_Plain::min_stack_level' [-Wreorder]
       size_t min_stack_level;
              ^~~~~~~~~~~~~~~
    /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_formats.cc:27:1: warning:   when initialized here [-Wreorder]
     RGWFormatter_Plain::RGWFormatter_Plain(const bool ukv)
     ^~~~~~~~~~~~~~~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/client/SyntheticClient.cc: In member function 'int SyntheticClient::random_walk(int)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/client/SyntheticClient.cc:2678:11: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
         if (.9*roll_die(::pow((double).9,(double)cwd.depth())) && !subdirs.empty()) {
             ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_rados.cc: In function 'void usage_log_hash(CephContext*, const string&, std::__cxx11::string&, uint32_t)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_rados.cc:4617:13: warning: '__builtin___snprintf_chk' output may be truncated before the last format character [-Wformat-truncation=]
     static void usage_log_hash(CephContext *cct, const string& name, string& hash, uint32_t index)
                 ^~~~~~~~~~~~~~
    In file included from /usr/include/stdio.h:862:0,
                     from /usr/include/c++/7.3.0/cstdio:42,
                     from /usr/include/c++/7.3.0/ext/string_conversions.h:43,
                     from /usr/include/c++/7.3.0/bits/basic_string.h:6349,
                     from /usr/include/c++/7.3.0/string:52,
                     from /usr/src/photon/BUILD/ceph-11.2.1/build/boost/include/boost/algorithm/string/std/string_traits.hpp:15,
                     from /usr/src/photon/BUILD/ceph-11.2.1/build/boost/include/boost/algorithm/string/std_containers_traits.hpp:19,
                     from /usr/src/photon/BUILD/ceph-11.2.1/build/boost/include/boost/algorithm/string.hpp:18,
                     from /usr/src/photon/BUILD/ceph-11.2.1/src/rgw/rgw_rados.cc:7:
    /usr/include/bits/stdio2.h:65:44: note: '__builtin___snprintf_chk' output between 8 and 17 bytes into a destination of size 16
            __bos (__s), __fmt, __va_arg_pack ());
                                            ^
    /usr/src/photon/BUILD/ceph-11.2.1/src/osdc/Journaler.cc: In member function 'void Journaler::_do_flush(unsigned int)':
    /usr/src/photon/BUILD/ceph-11.2.1/src/osdc/Journaler.cc:638:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (newlen < len) {
             ~~~~~~~^~~~~

    In file included from /usr/src/photon/BUILD/ceph-11.2.1/src/os/FuseStore.cc:4:0:
    /usr/src/photon/BUILD/ceph-11.2.1/src/os/FuseStore.h:32:8: error: 'std::function' has not been declared
       std::function<int(bufferlist *bl)> f);
            ^~~~~~~~

    cc1plus: all warnings being treated as errors

    Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu>

diff -Naurp ceph-11.2.1/src/client/SyntheticClient.cc ceph-11.2.1-modified/src/client/SyntheticClient.cc
--- ceph-11.2.1/src/client/SyntheticClient.cc	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/client/SyntheticClient.cc	2018-08-31 23:36:16.103720364 -0700
@@ -2675,7 +2675,7 @@ int SyntheticClient::random_walk(int num
     }
 
     // descend?
-    if (.9*roll_die(::pow((double).9,(double)cwd.depth())) && !subdirs.empty()) {
+    if (roll_die(::pow((double).9,(double)cwd.depth())) && !subdirs.empty()) {
       string s = get_random_subdir();
       cwd.push_dentry( s );
       dout(DBL) << "cd " << s << " -> " << cwd << dendl;
diff -Naurp ceph-11.2.1/src/cls/rbd/cls_rbd_types.h ceph-11.2.1-modified/src/cls/rbd/cls_rbd_types.h
--- ceph-11.2.1/src/cls/rbd/cls_rbd_types.h	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/cls/rbd/cls_rbd_types.h	2018-08-31 12:27:28.382048547 -0700
@@ -248,12 +248,12 @@ struct GroupSnapshotNamespace {
 
   GroupSnapshotNamespace(int64_t _group_pool,
 			 const string &_group_id,
-			 const snapid_t &_snapshot_id) :group_pool(_group_pool),
-							group_id(_group_id),
-							snapshot_id(_snapshot_id) {}
+			 const snapid_t &_snapshot_id)
+    : group_id(_group_id), group_pool(_group_pool),
+      snapshot_id(_snapshot_id) {}
 
-  int64_t group_pool;
   string group_id;
+  int64_t group_pool = 0;
   snapid_t snapshot_id;
 
   void encode(bufferlist& bl) const;
diff -Naurp ceph-11.2.1/src/krbd.cc ceph-11.2.1-modified/src/krbd.cc
--- ceph-11.2.1/src/krbd.cc	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/krbd.cc	2018-08-31 14:06:40.025032027 -0700
@@ -590,7 +590,7 @@ static int unmap_image(struct krbd_ctx *
                        const char *image, const char *snap,
                        const char *options)
 {
-  dev_t devno;
+  dev_t devno = 0;
   string id;
   int r;
 
diff -Naurp ceph-11.2.1/src/librbd/WatchNotifyTypes.h ceph-11.2.1-modified/src/librbd/WatchNotifyTypes.h
--- ceph-11.2.1/src/librbd/WatchNotifyTypes.h	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/librbd/WatchNotifyTypes.h	2018-08-31 12:16:15.931507551 -0700
@@ -250,7 +250,7 @@ struct SnapRenamePayload : public SnapPa
   SnapRenamePayload(const uint64_t &src_snap_id, const std::string &dst_name)
     : SnapPayloadBase(dst_name), snap_id(src_snap_id) {}
 
-  uint64_t snap_id;
+  uint64_t snap_id = 0;
 
   void encode(bufferlist &bl) const;
   void decode(__u8 version, bufferlist::iterator &iter);
diff -Naurp ceph-11.2.1/src/os/FuseStore.h ceph-11.2.1-modified/src/os/FuseStore.h
--- ceph-11.2.1/src/os/FuseStore.h	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/os/FuseStore.h	2018-09-01 10:38:04.897195245 -0700
@@ -7,6 +7,7 @@
 #include <string>
 #include <map>
 #include <mutex>
+#include <functional>
 
 #include "common/Thread.h"
 #include "include/buffer.h"
diff -Naurp ceph-11.2.1/src/osdc/Journaler.cc ceph-11.2.1-modified/src/osdc/Journaler.cc
--- ceph-11.2.1/src/osdc/Journaler.cc	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/osdc/Journaler.cc	2018-08-31 23:31:35.177332520 -0700
@@ -635,7 +635,7 @@ void Journaler::_do_flush(unsigned amoun
       waiting_for_zero = true;
       return;
     }
-    if (newlen < len) {
+    if (static_cast<uint64_t>(newlen) < len) {
       ldout(cct, 10) << "_do_flush wanted to do " << flush_pos << "~" << len
 		     << " but hit prezero_pos " << prezero_pos
 		     << ", will do " << flush_pos << "~" << newlen << dendl;
diff -Naurp ceph-11.2.1/src/rgw/rgw_formats.cc ceph-11.2.1-modified/src/rgw/rgw_formats.cc
--- ceph-11.2.1/src/rgw/rgw_formats.cc	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/rgw/rgw_formats.cc	2018-08-31 22:56:04.078661148 -0700
@@ -28,9 +28,9 @@ RGWFormatter_Plain::RGWFormatter_Plain(c
   : buf(NULL),
     len(0),
     max_len(0),
-    wrote_something(false),
     min_stack_level(0),
-    use_kv(ukv)
+    use_kv(ukv),
+    wrote_something(false)
 {
 }
 
diff -Naurp ceph-11.2.1/src/rgw/rgw_rados.cc ceph-11.2.1-modified/src/rgw/rgw_rados.cc
--- ceph-11.2.1/src/rgw/rgw_rados.cc	2017-08-08 12:07:05.000000000 -0700
+++ ceph-11.2.1-modified/src/rgw/rgw_rados.cc	2018-08-31 23:24:27.184451613 -0700
@@ -4623,7 +4623,7 @@ static void usage_log_hash(CephContext *
     val %= max_user_shards;
     val += ceph_str_hash_linux(name.c_str(), name.size());
   }
-  char buf[16];
+  char buf[17];
   int max_shards = max(cct->_conf->rgw_usage_max_shards, 1);
   snprintf(buf, sizeof(buf), RGW_USAGE_OBJ_PREFIX "%u", (unsigned)(val % max_shards));
   hash = buf;
diff -Naurp ceph-11.2.1/src/rocksdb/db/memtable.cc ceph-11.2.1-modified/src/rocksdb/db/memtable.cc
--- ceph-11.2.1/src/rocksdb/db/memtable.cc	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/db/memtable.cc	2018-08-31 12:12:35.564894877 -0700
@@ -733,6 +733,7 @@ void MemTable::Update(SequenceNumber seq
             return;
           }
         }
+        // fall through
         default:
           // If the latest value is kTypeDeletion, kTypeMerge or kTypeLogData
           // we don't have enough space for update inplace
diff -Naurp ceph-11.2.1/src/rocksdb/include/rocksdb/thread_status.h ceph-11.2.1-modified/src/rocksdb/include/rocksdb/thread_status.h
--- ceph-11.2.1/src/rocksdb/include/rocksdb/thread_status.h	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/include/rocksdb/thread_status.h	2018-08-14 12:12:13.944937512 -0700
@@ -21,11 +21,14 @@
 #include <vector>
 
 #ifndef ROCKSDB_USING_THREAD_STATUS
-#define ROCKSDB_USING_THREAD_STATUS \
-    !defined(ROCKSDB_LITE) && \
-    !defined(NROCKSDB_THREAD_STATUS) && \
-    !defined(OS_MACOSX) && \
-    !defined(IOS_CROSS_COMPILE)
+  #if !defined(ROCKSDB_LITE) && \
+      !defined(NROCKSDB_THREAD_STATUS) && \
+      !defined(OS_MACOSX) && \
+      !defined(IOS_CROSS_COMPILE)
+    #define ROCKSDB_USING_THREAD_STATUS 1
+  #else
+    #define ROCKSDB_USING_THREAD_STATUS 0
+  #endif
 #endif
 
 namespace rocksdb {
diff -Naurp ceph-11.2.1/src/rocksdb/util/logging.cc ceph-11.2.1-modified/src/rocksdb/util/logging.cc
--- ceph-11.2.1/src/rocksdb/util/logging.cc	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/util/logging.cc	2018-08-31 16:37:31.734011968 -0700
@@ -98,7 +98,7 @@ std::string NumberToString(uint64_t num)
 }
 
 std::string NumberToHumanString(int64_t num) {
-  char buf[16];
+  char buf[19];
   int64_t absnum = num < 0 ? -num : num;
   if (absnum < 10000) {
     snprintf(buf, sizeof(buf), "%" PRIi64, num);
diff -Naurp ceph-11.2.1/src/rocksdb/util/murmurhash.cc ceph-11.2.1-modified/src/rocksdb/util/murmurhash.cc
--- ceph-11.2.1/src/rocksdb/util/murmurhash.cc	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/util/murmurhash.cc	2018-08-31 15:59:42.406585325 -0700
@@ -47,11 +47,17 @@ uint64_t MurmurHash64A ( const void * ke
     switch(len & 7)
     {
     case 7: h ^= ((uint64_t)data2[6]) << 48;
+            // fall through
     case 6: h ^= ((uint64_t)data2[5]) << 40;
+            // fall through
     case 5: h ^= ((uint64_t)data2[4]) << 32;
+            // fall through
     case 4: h ^= ((uint64_t)data2[3]) << 24;
+            // fall through
     case 3: h ^= ((uint64_t)data2[2]) << 16;
+            // fall through
     case 2: h ^= ((uint64_t)data2[1]) << 8;
+            // fall through
     case 1: h ^= ((uint64_t)data2[0]);
         h *= m;
     };
diff -Naurp ceph-11.2.1/src/rocksdb/util/thread_local.h ceph-11.2.1-modified/src/rocksdb/util/thread_local.h
--- ceph-11.2.1/src/rocksdb/util/thread_local.h	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/util/thread_local.h	2018-08-14 12:11:50.733225774 -0700
@@ -13,13 +13,17 @@
 #include <memory>
 #include <unordered_map>
 #include <vector>
+#include <functional>
 
 #include "util/autovector.h"
 #include "port/port.h"
 
 #ifndef ROCKSDB_SUPPORT_THREAD_LOCAL
-#define ROCKSDB_SUPPORT_THREAD_LOCAL \
-  !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(IOS_CROSS_COMPILE)
+  #if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(IOS_CROSS_COMPILE)
+    #define ROCKSDB_SUPPORT_THREAD_LOCAL  1
+  #else
+    #define ROCKSDB_SUPPORT_THREAD_LOCAL  0
+  #endif
 #endif
 
 namespace rocksdb {
diff -Naurp ceph-11.2.1/src/rocksdb/util/transaction_test_util.cc ceph-11.2.1-modified/src/rocksdb/util/transaction_test_util.cc
--- ceph-11.2.1/src/rocksdb/util/transaction_test_util.cc	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/util/transaction_test_util.cc	2018-08-31 16:36:45.957817427 -0700
@@ -190,7 +190,7 @@ Status RandomTransactionInserter::Verify
 
   // For each set of keys with the same prefix, sum all the values
   for (uint32_t i = 0; i < num_sets; i++) {
-    char prefix_buf[5];
+    char prefix_buf[6];
     snprintf(prefix_buf, sizeof(prefix_buf), "%.4u", i + 1);
     uint64_t total = 0;
 
diff -Naurp ceph-11.2.1/src/rocksdb/utilities/persistent_cache/block_cache_tier_file.h ceph-11.2.1-modified/src/rocksdb/utilities/persistent_cache/block_cache_tier_file.h
--- ceph-11.2.1/src/rocksdb/utilities/persistent_cache/block_cache_tier_file.h	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/utilities/persistent_cache/block_cache_tier_file.h	2018-08-31 17:13:45.102471473 -0700
@@ -10,6 +10,7 @@
 #include <memory>
 #include <string>
 #include <vector>
+#include <functional>
 
 #include "rocksdb/comparator.h"
 #include "rocksdb/env.h"
diff -Naurp ceph-11.2.1/src/rocksdb/utilities/persistent_cache/hash_table_evictable.h ceph-11.2.1-modified/src/rocksdb/utilities/persistent_cache/hash_table_evictable.h
--- ceph-11.2.1/src/rocksdb/utilities/persistent_cache/hash_table_evictable.h	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/utilities/persistent_cache/hash_table_evictable.h	2018-08-31 17:53:52.604618935 -0700
@@ -7,6 +7,8 @@
 
 #ifndef ROCKSDB_LITE
 
+#include <functional>
+
 #include "util/random.h"
 #include "utilities/persistent_cache/hash_table.h"
 #include "utilities/persistent_cache/lrulist.h"
diff -Naurp ceph-11.2.1/src/rocksdb/utilities/transactions/transaction_util.cc ceph-11.2.1-modified/src/rocksdb/utilities/transactions/transaction_util.cc
--- ceph-11.2.1/src/rocksdb/utilities/transactions/transaction_util.cc	2016-11-20 18:24:12.000000000 -0800
+++ ceph-11.2.1-modified/src/rocksdb/utilities/transactions/transaction_util.cc	2018-08-31 19:30:14.358749270 -0700
@@ -81,7 +81,7 @@ Status TransactionUtil::CheckKey(DBImpl*
     if (cache_only) {
       // The age of this memtable is too new to use to check for recent
       // writes.
-      char msg[255];
+      char msg[295];
       snprintf(msg, sizeof(msg),
                "Transaction could not check for conflicts for operation at "
                "SequenceNumber %" PRIu64