From: John Spray Date: Tue, 8 Apr 2014 13:15:43 +0000 (+0100) Subject: mds: switch __u32 with LogEvent::EventType typedef X-Git-Tag: v0.82~48^2~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f4927f00a4ce7252e95062d02e64afffe73fb280;p=ceph.git mds: switch __u32 with LogEvent::EventType typedef Signed-off-by: John Spray --- diff --git a/src/mds/LogEvent.cc b/src/mds/LogEvent.cc index c6c9ce725d18..2928a61a78fa 100644 --- a/src/mds/LogEvent.cc +++ b/src/mds/LogEvent.cc @@ -43,7 +43,7 @@ LogEvent *LogEvent::decode(bufferlist& bl) { // parse type, length bufferlist::iterator p = bl.begin(); - __u32 type; + EventType type; LogEvent *event = NULL; ::decode(type, p); diff --git a/src/mds/LogEvent.h b/src/mds/LogEvent.h index 6243c2c8ba10..1152ade84765 100644 --- a/src/mds/LogEvent.h +++ b/src/mds/LogEvent.h @@ -52,17 +52,20 @@ class EMetaBlob; // generic log event class LogEvent { - private: - __u32 _type; +public: + typedef __u32 EventType; + +private: + EventType _type; uint64_t _start_off; - static LogEvent *decode_event(bufferlist& bl, bufferlist::iterator& p, __u32 type); + static LogEvent *decode_event(bufferlist& bl, bufferlist::iterator& p, EventType type); protected: utime_t stamp; friend class MDLog; - public: +public: LogSegment *_segment; LogEvent(int t) @@ -70,9 +73,9 @@ protected: virtual ~LogEvent() { } string get_type_str() const; - static __u32 str_to_type(std::string const &str); - int get_type() const { return _type; } - void set_type(int t) { _type = t; } + static EventType str_to_type(std::string const &str); + EventType get_type() const { return _type; } + void set_type(EventType t) { _type = t; } uint64_t get_start_off() const { return _start_off; } void set_start_off(uint64_t o) { _start_off = o; }