History

libceph: ceph_can_shift_osds(pool) and pool type defines

Bring in pg_pool_t::can_shift_osds() counterpart along with pool type defines.

Ilya Dryomov committed 12 years ago

Commit 2abebdb1 parent 246138f2 files · +15 −2Browse files

Showing the changes to include/linux/ceph (2 of 2 files). Show all

Unified · Split

2 files
  1. include/linux/ceph/osdmap.h +12 −0
  2. include/linux/ceph/rados.h +3 −2
include/linux/ceph/osdmap.h+12−0
@@ -41,6 +41,18 @@ struct ceph_pg_pool_info { · 40 unmodified lines
41 char *name;41 char *name;
42};42};
43 43
44static inline bool ceph_can_shift_osds(struct ceph_pg_pool_info *pool)
45{
46 switch (pool->type) {
47 case CEPH_POOL_TYPE_REP:
48 return true;
49 case CEPH_POOL_TYPE_EC:
50 return false;
51 default:
52 BUG_ON(1);
53 }
54}
55
44struct ceph_object_locator {56struct ceph_object_locator {
45 s64 pool;57 s64 pool;
46};58};
include/linux/ceph/rados.h+3−2
@@ -81,8 +81,9 @@ struct ceph_pg_v1 { · 80 unmodified lines
81 */81 */
82#define CEPH_NOPOOL ((__u64) (-1)) /* pool id not defined */82#define CEPH_NOPOOL ((__u64) (-1)) /* pool id not defined */
83 83
84#define CEPH_PG_TYPE_REP 184#define CEPH_POOL_TYPE_REP 1
85#define CEPH_PG_TYPE_RAID4 285#define CEPH_POOL_TYPE_RAID4 2 /* never implemented */
86#define CEPH_POOL_TYPE_EC 3
86 87
87/*88/*
88 * stable_mod func is used to control number of placement groups.89 * stable_mod func is used to control number of placement groups.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t