summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-22 14:29:37 -0700
committerSage Weil <sage@inktank.com>2013-06-19 12:39:36 -0700
commitb76540f6e2db7a08dee86f84358d56c4ea0b3293 (patch)
treea31faed4fcb006ff8685a3e573747cd51c96c615
parent2434ecca6f8e1f2af62c74cb1b7df277f4a076f7 (diff)
downloadceph-b76540f6e2db7a08dee86f84358d56c4ea0b3293.tar.gz
messages/MOSDMarkMeDown: fix uninit field
Fixes valgrind warning: ==14803== Use of uninitialised value of size 8 ==14803== at 0x12E7614: sctp_crc32c_sb8_64_bit (sctp_crc32.c:567) ==14803== by 0x12E76F8: update_crc32 (sctp_crc32.c:609) ==14803== by 0x12E7720: ceph_crc32c_le (sctp_crc32.c:733) ==14803== by 0x105085F: ceph::buffer::list::crc32c(unsigned int) (buffer.h:427) ==14803== by 0x115D7B2: Message::calc_front_crc() (Message.h:441) ==14803== by 0x1159BB0: Message::encode(unsigned long, bool) (Message.cc:170) ==14803== by 0x1323934: Pipe::writer() (Pipe.cc:1524) ==14803== by 0x13293D9: Pipe::Writer::entry() (Pipe.h:59) ==14803== by 0x120A398: Thread::_entry_func(void*) (Thread.cc:41) ==14803== by 0x503BE99: start_thread (pthread_create.c:308) ==14803== by 0x6C6E4BC: clone (clone.S:112) Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit eb91f41042fa31df2bef9140affa6eac726f6187)
-rw-r--r--src/messages/MOSDMarkMeDown.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/messages/MOSDMarkMeDown.h b/src/messages/MOSDMarkMeDown.h
index e99c83d18dd..1a0475dc521 100644
--- a/src/messages/MOSDMarkMeDown.h
+++ b/src/messages/MOSDMarkMeDown.h
@@ -24,7 +24,7 @@ class MOSDMarkMeDown : public PaxosServiceMessage {
public:
uuid_d fsid;
entity_inst_t target_osd;
- epoch_t e;
+ epoch_t epoch;
bool ack;
MOSDMarkMeDown()
@@ -32,27 +32,27 @@ class MOSDMarkMeDown : public PaxosServiceMessage {
MOSDMarkMeDown(const uuid_d &fs, const entity_inst_t& f,
epoch_t e, bool ack)
: PaxosServiceMessage(MSG_OSD_MARK_ME_DOWN, e, HEAD_VERSION),
- fsid(fs), target_osd(f), ack(ack) {}
+ fsid(fs), target_osd(f), epoch(e), ack(ack) {}
private:
~MOSDMarkMeDown() {}
public:
entity_inst_t get_target() { return target_osd; }
- epoch_t get_epoch() { return e; }
+ epoch_t get_epoch() { return epoch; }
void decode_payload() {
bufferlist::iterator p = payload.begin();
paxos_decode(p);
::decode(fsid, p);
::decode(target_osd, p);
- ::decode(e, p);
+ ::decode(epoch, p);
::decode(ack, p);
}
void encode_payload(uint64_t features) {
paxos_encode();
::encode(fsid, payload);
::encode(target_osd, payload);
- ::encode(e, payload);
+ ::encode(epoch, payload);
::encode(ack, payload);
}