From e725c077e828f7511a24ca0b00da899cdba459c6 Mon Sep 17 00:00:00 2001 From: sageweil Date: Sat, 29 Sep 2007 00:16:40 +0000 Subject: [PATCH] type cleanup git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1865 29311d96-e01e-0410-9327-a35deaab8ce9 --- branches/sage/mds/include/types.h | 6 +++--- branches/sage/mds/mon/MonMap.h | 20 ++++++++------------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/branches/sage/mds/include/types.h b/branches/sage/mds/include/types.h index 088417acc20ac..92bcb94c6dc5f 100644 --- a/branches/sage/mds/include/types.h +++ b/branches/sage/mds/include/types.h @@ -242,13 +242,13 @@ struct inode_t { // base (immutable) inodeno_t ino; FileLayout layout; // ?immutable? - dev_t rdev; // if special file + uint32_t rdev; // if special file // affected by any inode change... utime_t ctime; // inode change time // perm (namespace permissions) - mode_t mode; + uint32_t mode; uid_t uid; gid_t gid; @@ -257,7 +257,7 @@ struct inode_t { bool anchored; // auth only? // file (data access) - off_t size, max_size, allocated_size; + int64_t size, max_size, allocated_size; utime_t mtime; // file data modify time. utime_t atime; // file data access time. diff --git a/branches/sage/mds/mon/MonMap.h b/branches/sage/mds/mon/MonMap.h index eb18579cd7e99..dbe9c9b5ac5e9 100644 --- a/branches/sage/mds/mon/MonMap.h +++ b/branches/sage/mds/mon/MonMap.h @@ -24,8 +24,8 @@ class MonMap { public: - epoch_t epoch; // what epoch/version of the monmap - int num_mon; + epoch_t epoch; // what epoch/version of the monmap + int32_t num_mon; vector mon_inst; int last_mon; // last mon i talked to @@ -52,20 +52,16 @@ class MonMap { } void encode(bufferlist& blist) { - blist.append((char*)&epoch, sizeof(epoch)); - blist.append((char*)&num_mon, sizeof(num_mon)); - - _encode(mon_inst, blist); + ::_encode(epoch, blist); + ::_encode(num_mon, blist); + ::_encode(mon_inst, blist); } void decode(bufferlist& blist) { int off = 0; - blist.copy(off, sizeof(epoch), (char*)&epoch); - off += sizeof(epoch); - blist.copy(off, sizeof(num_mon), (char*)&num_mon); - off += sizeof(num_mon); - - _decode(mon_inst, blist, off); + ::_decode(epoch, blist, off); + ::_decode(num_mon, blist, off); + ::_decode(mon_inst, blist, off); } // read from/write to a file -- 2.39.5