struct ceph_mon_statfs {
__le64 have_version;
- ceph_fsid_t fsid;
+ struct ceph_fsid fsid;
__le64 tid;
} __attribute__ ((packed));
} __attribute__ ((packed));
struct ceph_mon_statfs_reply {
- ceph_fsid_t fsid;
+ struct ceph_fsid fsid;
__le64 tid;
__le64 version;
struct ceph_statfs st;
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 {
/*
* 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));
}
#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)
#define O_LAZY 01000000
-
+typedef struct ceph_fsid ceph_fsid_t;
// --------------------------------------
// identify individual mount clients by 64bit value
// --
-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],
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);
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),
#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
*/
{
struct ceph_monmap *m = 0;
int i, err = -EINVAL;
- ceph_fsid_t fsid;
+ struct ceph_fsid fsid;
u32 epoch, num_mon;
u16 version;
* 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];
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;
{
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;
};
struct ceph_osdmap {
- ceph_fsid_t fsid;
+ struct ceph_fsid fsid;
u32 epoch;
u32 mkfs_epoch;
struct ceph_timespec created, modified;
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 */
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;
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]);
}
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.