From: Danny Al-Gaaf Date: Fri, 12 Jun 2015 08:05:59 +0000 (+0200) Subject: mds/MDCache.cc: init 'default_file_layout' in ctor X-Git-Tag: v9.1.0~446^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc5093a0b7be1a329b08ce3c071e0c56232aaac7;p=ceph.git mds/MDCache.cc: init 'default_file_layout' in ctor Fix for: CID 717237 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member field default_file_layout.fl_pg_pool is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member field default_file_layout.fl_stripe_unit is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member field default_file_layout.fl_stripe_count is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member field default_file_layout.fl_object_size is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member field default_file_layout.fl_cas_hash is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member field default_file_layout.fl_object_stripe_unit is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member field default_file_layout.fl_unused is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 1cf5161aa0b..6189d72dc99 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -212,6 +212,7 @@ MDCache::MDCache(MDS *m) : decayrate.set_halflife(g_conf->mds_decay_halflife); + memset(&default_file_layout, 0, sizeof(default_file_layout)); memset(&default_log_layout, 0, sizeof(default_log_layout)); did_shutdown_log_cap = false;