Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359695
b: refs/heads/master
c: 4f6a7e5
h: refs/heads/master
i:
  359693: d377ba8
  359691: d175c8f
  359687: 43dc8c5
  359679: ed40ea8
v: v3
  • Loading branch information
Sage Weil committed Feb 26, 2013
1 parent e712a89 commit 647cfdd
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 120 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec73a754989c27628c9037887df919561280519c
refs/heads/master: 4f6a7e5ee1393ec4b243b39dac9f36992d161540
12 changes: 8 additions & 4 deletions trunk/fs/ceph/mdsmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
return ERR_PTR(-ENOMEM);

ceph_decode_16_safe(p, end, version, bad);
if (version > 3) {
pr_warning("got mdsmap version %d > 3, failing", version);
goto bad;
}

ceph_decode_need(p, end, 8*sizeof(u32) + sizeof(u64), bad);
m->m_epoch = ceph_decode_32(p);
Expand Down Expand Up @@ -144,13 +148,13 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
/* pg_pools */
ceph_decode_32_safe(p, end, n, bad);
m->m_num_data_pg_pools = n;
m->m_data_pg_pools = kcalloc(n, sizeof(u32), GFP_NOFS);
m->m_data_pg_pools = kcalloc(n, sizeof(u64), GFP_NOFS);
if (!m->m_data_pg_pools)
goto badmem;
ceph_decode_need(p, end, sizeof(u32)*(n+1), bad);
ceph_decode_need(p, end, sizeof(u64)*(n+1), bad);
for (i = 0; i < n; i++)
m->m_data_pg_pools[i] = ceph_decode_32(p);
m->m_cas_pg_pool = ceph_decode_32(p);
m->m_data_pg_pools[i] = ceph_decode_64(p);
m->m_cas_pg_pool = ceph_decode_64(p);

/* ok, we don't care about the rest. */
dout("mdsmap_decode success epoch %u\n", m->m_epoch);
Expand Down
14 changes: 10 additions & 4 deletions trunk/include/linux/ceph/ceph_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@
* Features supported.
*/
#define CEPH_FEATURES_SUPPORTED_DEFAULT \
(CEPH_FEATURE_NOSRCADDR | \
CEPH_FEATURE_CRUSH_TUNABLES | \
CEPH_FEATURE_CRUSH_TUNABLES2 | \
(CEPH_FEATURE_NOSRCADDR | \
CEPH_FEATURE_PGID64 | \
CEPH_FEATURE_PGPOOL3 | \
CEPH_FEATURE_OSDENC | \
CEPH_FEATURE_CRUSH_TUNABLES | \
CEPH_FEATURE_CRUSH_TUNABLES2 | \
CEPH_FEATURE_REPLY_CREATE_INODE)

#define CEPH_FEATURES_REQUIRED_DEFAULT \
(CEPH_FEATURE_NOSRCADDR)
(CEPH_FEATURE_NOSRCADDR | \
CEPH_FEATURE_PGID64 | \
CEPH_FEATURE_PGPOOL3 | \
CEPH_FEATURE_OSDENC)
#endif
4 changes: 2 additions & 2 deletions trunk/include/linux/ceph/mdsmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ struct ceph_mdsmap {

/* which object pools file data can be stored in */
int m_num_data_pg_pools;
u32 *m_data_pg_pools;
u32 m_cas_pg_pool;
u64 *m_data_pg_pools;
u64 m_cas_pg_pool;
};

static inline struct ceph_entity_addr *
Expand Down
16 changes: 13 additions & 3 deletions trunk/include/linux/ceph/osdmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,22 @@ struct ceph_pg {

struct ceph_pg_pool_info {
struct rb_node node;
int id;
struct ceph_pg_pool v;
int pg_num_mask, pgp_num_mask, lpg_num_mask, lpgp_num_mask;
s64 id;
u8 type;
u8 size;
u8 crush_ruleset;
u8 object_hash;
u32 pg_num, pgp_num;
int pg_num_mask, pgp_num_mask;
u64 flags;
char *name;
};

struct ceph_object_locator {
uint64_t pool;
char *key;
};

struct ceph_pg_mapping {
struct rb_node node;
struct ceph_pg pgid;
Expand Down
23 changes: 0 additions & 23 deletions trunk/include/linux/ceph/rados.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@

#include <linux/ceph/msgr.h>

/*
* osdmap encoding versions
*/
#define CEPH_OSDMAP_INC_VERSION 5
#define CEPH_OSDMAP_INC_VERSION_EXT 6
#define CEPH_OSDMAP_VERSION 5
#define CEPH_OSDMAP_VERSION_EXT 6

/*
* fs id
*/
Expand Down Expand Up @@ -91,21 +83,6 @@ struct ceph_pg_v1 {

#define CEPH_PG_TYPE_REP 1
#define CEPH_PG_TYPE_RAID4 2
#define CEPH_PG_POOL_VERSION 2
struct ceph_pg_pool {
__u8 type; /* CEPH_PG_TYPE_* */
__u8 size; /* number of osds in each pg */
__u8 crush_ruleset; /* crush placement rule */
__u8 object_hash; /* hash mapping object name to ps */
__le32 pg_num, pgp_num; /* number of pg's */
__le32 lpg_num, lpgp_num; /* number of localized pg's */
__le32 last_change; /* most recent epoch changed */
__le64 snap_seq; /* seq for per-pool snapshot */
__le32 snap_epoch; /* epoch of last snap */
__le32 num_snaps;
__le32 num_removed_snap_intervals; /* if non-empty, NO per-pool snaps */
__le64 auid; /* who owns the pg */
} __attribute__ ((packed));

/*
* stable_mod func is used to control number of placement groups.
Expand Down
6 changes: 2 additions & 4 deletions trunk/net/ceph/ceph_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,8 @@ static int __init init_ceph_lib(void)
if (ret < 0)
goto out_crypto;

pr_info("loaded (mon/osd proto %d/%d, osdmap %d/%d %d/%d)\n",
CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL,
CEPH_OSDMAP_VERSION, CEPH_OSDMAP_VERSION_EXT,
CEPH_OSDMAP_INC_VERSION, CEPH_OSDMAP_INC_VERSION_EXT);
pr_info("loaded (mon/osd proto %d/%d)\n",
CEPH_MONC_PROTOCOL, CEPH_OSDC_PROTOCOL);

return 0;

Expand Down
6 changes: 3 additions & 3 deletions trunk/net/ceph/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ static int osdmap_show(struct seq_file *s, void *p)
for (n = rb_first(&client->osdc.osdmap->pg_pools); n; n = rb_next(n)) {
struct ceph_pg_pool_info *pool =
rb_entry(n, struct ceph_pg_pool_info, node);
seq_printf(s, "pg_pool %d pg_num %d / %d, lpg_num %d / %d\n",
pool->id, pool->v.pg_num, pool->pg_num_mask,
pool->v.lpg_num, pool->lpg_num_mask);
seq_printf(s, "pg_pool %llu pg_num %d / %d\n",
(unsigned long long)pool->id, pool->pg_num,
pool->pg_num_mask);
}
for (i = 0; i < client->osdc.osdmap->max_osd; i++) {
struct ceph_entity_addr *addr =
Expand Down
Loading

0 comments on commit 647cfdd

Please sign in to comment.