Skip to content

Commit

Permalink
Merge pull request #16898 from amitkumar50/cov-messages-6
Browse files Browse the repository at this point in the history
messages: Initialization of member variables

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
gregsfortytwo committed Aug 11, 2017
2 parents 50724db + 406348f commit 4e69d80
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/messages/MDirUpdate.h
Expand Up @@ -19,10 +19,10 @@
#include "msg/Message.h"

class MDirUpdate : public Message {
mds_rank_t from_mds;
mds_rank_t from_mds = -1;
dirfrag_t dirfrag;
int32_t dir_rep;
int32_t discover;
int32_t dir_rep = 5;
int32_t discover = 5;
compact_set<int32_t> dir_rep_by;
filepath path;
int tried_discover;
Expand Down
4 changes: 2 additions & 2 deletions src/messages/MDiscover.h
Expand Up @@ -29,8 +29,8 @@ class MDiscover : public Message {
snapid_t snapid;
filepath want; // ... [/]need/this/stuff

bool want_base_dir;
bool want_xlocked;
bool want_base_dir = true;
bool want_xlocked = false;

public:
inodeno_t get_base_ino() { return base_ino; }
Expand Down
14 changes: 7 additions & 7 deletions src/messages/MDiscoverReply.h
Expand Up @@ -70,20 +70,20 @@ class MDiscoverReply : public Message {
// info about original request
inodeno_t base_ino;
frag_t base_dir_frag;
bool wanted_base_dir;
bool wanted_xlocked;
bool wanted_base_dir = false;
bool wanted_xlocked = false;
snapid_t wanted_snapid;

// and the response
bool flag_error_dn;
bool flag_error_dir;
bool flag_error_dn = false;
bool flag_error_dir = false;
std::string error_dentry; // dentry that was not found (to trigger waiters on asker)
bool unsolicited;
bool unsolicited = false;

mds_rank_t dir_auth_hint;
mds_rank_t dir_auth_hint = 0;

public:
__u8 starts_with;
__u8 starts_with = 0;
bufferlist trace;

enum { DIR, DENTRY, INODE };
Expand Down
2 changes: 1 addition & 1 deletion src/messages/MExportDirDiscover.h
Expand Up @@ -19,7 +19,7 @@
#include "include/types.h"

class MExportDirDiscover : public Message {
mds_rank_t from;
mds_rank_t from = -1;
dirfrag_t dirfrag;
filepath path;

Expand Down

0 comments on commit 4e69d80

Please sign in to comment.