]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: kill ceph_fsid_t typedef
authorSage Weil <sage@newdream.net>
Tue, 8 Sep 2009 23:42:09 +0000 (16:42 -0700)
committerSage Weil <sage@newdream.net>
Tue, 8 Sep 2009 23:42:09 +0000 (16:42 -0700)
13 files changed:
src/include/ceph_fs.h
src/include/rados.h
src/include/types.h
src/kernel/mds_client.c
src/kernel/mdsmap.c
src/kernel/mdsmap.h
src/kernel/mon_client.c
src/kernel/mon_client.h
src/kernel/osd_client.c
src/kernel/osdmap.c
src/kernel/osdmap.h
src/kernel/super.h
src/osd/osd_types.h

index 39b8b3ed8bd8ae29f46fdc03bc43cfe55128857e..f5b8c60aa95027f3242df9a53149eb16d5be43d8 100644 (file)
@@ -296,7 +296,7 @@ ceph_full_name_hash(const char *name, unsigned int len)
 
 struct ceph_mon_statfs {
        __le64 have_version;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        __le64 tid;
 } __attribute__ ((packed));
 
@@ -306,7 +306,7 @@ struct ceph_statfs {
 } __attribute__ ((packed));
 
 struct ceph_mon_statfs_reply {
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        __le64 tid;
        __le64 version;
        struct ceph_statfs st;
@@ -314,13 +314,13 @@ struct ceph_mon_statfs_reply {
 
 struct ceph_osd_getmap {
        __le64 have_version;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        __le32 start;
 } __attribute__ ((packed));
 
 struct ceph_mds_getmap {
        __le64 have_version;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
 } __attribute__ ((packed));
 
 struct ceph_client_mount {
index a83cf35a7914bcdf02b2b6765d49d4a827c5c45b..a871577ed752dda417367705e1ea5555da499a95 100644 (file)
 /*
  * fs id
  */
-typedef struct { unsigned char fsid[16]; } ceph_fsid_t;
+struct ceph_fsid {
+       unsigned char fsid[16];
+};
 
-static inline int ceph_fsid_compare(const ceph_fsid_t *a,
-                                   const ceph_fsid_t *b)
+static inline int ceph_fsid_compare(const struct ceph_fsid *a,
+                                   const struct ceph_fsid *b)
 {
        return memcmp(a, b, sizeof(*a));
 }
index 5376dae1082fd79b13d647848f58726e59541afd..f166cc5b2000c417853ab1125fec8f8ba9e581d3 100644 (file)
@@ -197,7 +197,7 @@ struct ltstr
 
 #include "encoding.h"
 
-WRITE_RAW_ENCODER(ceph_fsid_t)
+WRITE_RAW_ENCODER(ceph_fsid)
 WRITE_RAW_ENCODER(ceph_file_layout)
 WRITE_RAW_ENCODER(ceph_pg_pool)
 WRITE_RAW_ENCODER(ceph_mds_session_head)
@@ -234,7 +234,7 @@ typedef __u32 epoch_t;       // map epoch  (32bits -> 13 epochs/second for 10 ye
 
 #define O_LAZY 01000000
 
-
+typedef struct ceph_fsid ceph_fsid_t;
 
 // --------------------------------------
 // identify individual mount clients by 64bit value
@@ -389,7 +389,7 @@ inline ostream& operator<<(ostream& out, const SnapContext& snapc) {
 
 // --
 
-inline ostream& operator<<(ostream& out, const ceph_fsid_t& f) {
+inline ostream& operator<<(ostream& out, const ceph_fsid& f) {
   char b[37];
   sprintf(b, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
          f.fsid[0], f.fsid[1], f.fsid[2], f.fsid[3], f.fsid[4], f.fsid[5], f.fsid[6], f.fsid[7],
index 06b940f98e8320ef16442919fa75b34516a454a3..c641eb33425de2435b20c6e0ff7d03c6b8a93437 100644 (file)
@@ -2778,7 +2778,7 @@ void ceph_mdsc_handle_map(struct ceph_mds_client *mdsc, struct ceph_msg *msg)
        void *p = msg->front.iov_base;
        void *end = p + msg->front.iov_len;
        struct ceph_mdsmap *newmap, *oldmap;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        int err = -EINVAL;
 
        ceph_decode_need(&p, end, sizeof(fsid)+2*sizeof(u32), bad);
index 081dd5117fecad8a5cfa747ed6b46dd925aac48d..f13e1a5fbd9e7bd5ccfa4787f304c0a4bd877c6e 100644 (file)
@@ -87,7 +87,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
                ceph_decode_8(p, infoversion);
                ceph_decode_32(p, namelen);  /* skip mds name */
                *p += namelen;
-               
+
                ceph_decode_need(p, end,
                                 5*sizeof(u32) + sizeof(u64) +
                                 sizeof(addr) + sizeof(struct ceph_timespec),
index b9f311a82f6470d2c20930abbd2172e00c77688f..ea8a0f5275879dd61b282cfe37f40e39e1a7b4c1 100644 (file)
@@ -4,7 +4,7 @@
 #include "types.h"
 
 /*
- * mds map - describe servers in the mds cluster.  
+ * mds map - describe servers in the mds cluster.
  *
  * we limit fields to those the client actually xcares about
  */
index 521c0366b255f1eb0b00a3041cd8dd87d9fae8ee..a96a8aada0fa00213ad02ec25a7477e4f035a0b8 100644 (file)
@@ -35,7 +35,7 @@ struct ceph_monmap *ceph_monmap_decode(void *p, void *end)
 {
        struct ceph_monmap *m = 0;
        int i, err = -EINVAL;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        u32 epoch, num_mon;
        u16 version;
 
index 5d6994d105d46b0b03bc6c397b130bd380717f9b..d2d87dc5c660c4376732fb0dcb2733c955395a33 100644 (file)
@@ -12,7 +12,7 @@ struct ceph_mount_args;
  * The monitor map enumerates the set of all monitors.
  */
 struct ceph_monmap {
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        u32 epoch;
        u32 num_mon;
        struct ceph_entity_inst mon_inst[0];
index f532f7e815608790464db3950b94b7499e579d8e..6366dcfe836daa8b6b87a041b37b9f57e82a0a25 100644 (file)
@@ -848,7 +848,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
        u32 epoch;
        struct ceph_osdmap *newmap = NULL, *oldmap;
        int err;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
 
        dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0);
        p = msg->front.iov_base;
index 3c88e5cfefc25e016ec60518ef9d783a4cbc0e1c..18574c3b76c9d0861d06669c0d259a64f876719b 100644 (file)
@@ -519,7 +519,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
 {
        struct ceph_osdmap *newmap = map;
        struct crush_map *newcrush = NULL;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        u32 epoch = 0;
        struct ceph_timespec modified;
        u32 len, pool;
index b2721ae375519d8d735f574b19ac018989fbefa9..df9203054d4f43eaca86950fa05df04a3c277914 100644 (file)
@@ -31,7 +31,7 @@ struct ceph_pg_mapping {
 };
 
 struct ceph_osdmap {
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        u32 epoch;
        u32 mkfs_epoch;
        struct ceph_timespec created, modified;
index 73540d053d09a3021485b874f70f184d1f1c068d..4638c338b17cebb11ad04d84569c9d9503121a72 100644 (file)
@@ -52,7 +52,7 @@ struct ceph_mount_args {
        int flags;
        int mount_timeout;
        int caps_wanted_delay_min, caps_wanted_delay_max;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
        struct ceph_entity_addr my_addr;
        int wsize;
        int rsize;            /* max readahead */
@@ -116,7 +116,7 @@ struct ceph_client {
 
        struct mutex mount_mutex;       /* serialize mount attempts */
        struct ceph_mount_args mount_args;
-       ceph_fsid_t fsid;
+       struct ceph_fsid fsid;
 
        struct super_block *sb;
 
@@ -770,22 +770,22 @@ extern struct kmem_cache *ceph_file_cachep;
 
 extern const char *ceph_msg_type_name(int type);
 
-static inline __le64 __ceph_fsid_minor(ceph_fsid_t *fsid)
+static inline __le64 __ceph_fsid_minor(struct ceph_fsid *fsid)
 {
        return get_unaligned_le64(&fsid->fsid[8]);
 }
 
-static inline __le64 __ceph_fsid_major(ceph_fsid_t *fsid)
+static inline __le64 __ceph_fsid_major(struct ceph_fsid *fsid)
 {
        return get_unaligned_le64(&fsid->fsid[0]);
 }
 
-static inline void __ceph_fsid_set_minor(ceph_fsid_t *fsid, __le64 val)
+static inline void __ceph_fsid_set_minor(struct ceph_fsid *fsid, __le64 val)
 {
        put_unaligned_le64(val, &fsid->fsid[8]);
 }
 
-static inline void __ceph_fsid_set_major(ceph_fsid_t *fsid, __le64 val)
+static inline void __ceph_fsid_set_major(struct ceph_fsid *fsid, __le64 val)
 {
        put_unaligned_le64(val, &fsid->fsid[0]);
 }
index 375605e681e90795b679547c2f843e842c615eae..72cf18f33d69793dbf9d9ad0f0a297c2c7067c90 100644 (file)
@@ -877,7 +877,7 @@ inline ostream& operator<<(ostream& out, ObjectExtent &ex)
 class OSDSuperblock {
 public:
   nstring magic;
-  ceph_fsid_t fsid;
+  ceph_fsid fsid;
   int32_t whoami;    // my role in this fs.
   epoch_t current_epoch;             // most recent epoch
   epoch_t oldest_map, newest_map;    // oldest/newest maps we have.