diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-15 10:26:50 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-05-15 10:26:50 -0400 |
| commit | 12e04ffcd93b25dfd726d46338c2ee7d23de556e (patch) | |
| tree | f91479a62805619168994fd3ee55e3ffa23fc24e /include/linux/ceph/osdmap.h | |
| parent | 9eff37a8713939f218ab8bf0dc93f1d67af7b8b4 (diff) | |
| parent | f722406faae2d073cc1d01063d1123c35425939e (diff) | |
Merge tag 'v3.10-rc1' into stable/for-linus-3.10
Linux 3.10-rc1
* tag 'v3.10-rc1': (12273 commits)
Linux 3.10-rc1
[SCSI] qla2xxx: Update firmware link in Kconfig file.
[SCSI] iscsi class, qla4xxx: fix sess/conn refcounting when find fns are used
[SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type
[SCSI] pm80xx: thermal, sas controller config and error handling update
[SCSI] pm80xx: NCQ error handling changes
[SCSI] pm80xx: WWN Modification for PM8081/88/89 controllers
[SCSI] pm80xx: Changed module name and debug messages update
[SCSI] pm80xx: Firmware flash memory free fix, with addition of new memory region for it
[SCSI] pm80xx: SPC new firmware changes for device id 0x8081 alone
[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files
[SCSI] pm80xx: MSI-X implementation for using 64 interrupts
[SCSI] pm80xx: Updated common functions common for SPC and SPCv/ve
[SCSI] pm80xx: Multiple inbound/outbound queue configuration
[SCSI] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
[SCSI] lpfc: fix up Kconfig dependencies
[SCSI] Handle MLQUEUE busy response in scsi_send_eh_cmnd
dm cache: set config value
dm cache: move config fns
dm thin: generate event when metadata threshold passed
...
Diffstat (limited to 'include/linux/ceph/osdmap.h')
| -rw-r--r-- | include/linux/ceph/osdmap.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index c819190d1642..d05cc4451af6 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/rbtree.h> | 4 | #include <linux/rbtree.h> |
| 5 | #include <linux/ceph/types.h> | 5 | #include <linux/ceph/types.h> |
| 6 | #include <linux/ceph/decode.h> | ||
| 6 | #include <linux/ceph/ceph_fs.h> | 7 | #include <linux/ceph/ceph_fs.h> |
| 7 | #include <linux/crush/crush.h> | 8 | #include <linux/crush/crush.h> |
| 8 | 9 | ||
| @@ -119,6 +120,29 @@ static inline struct ceph_entity_addr *ceph_osd_addr(struct ceph_osdmap *map, | |||
| 119 | return &map->osd_addr[osd]; | 120 | return &map->osd_addr[osd]; |
| 120 | } | 121 | } |
| 121 | 122 | ||
| 123 | static inline int ceph_decode_pgid(void **p, void *end, struct ceph_pg *pgid) | ||
| 124 | { | ||
| 125 | __u8 version; | ||
| 126 | |||
| 127 | if (!ceph_has_room(p, end, 1 + 8 + 4 + 4)) { | ||
| 128 | pr_warning("incomplete pg encoding"); | ||
| 129 | |||
| 130 | return -EINVAL; | ||
| 131 | } | ||
| 132 | version = ceph_decode_8(p); | ||
| 133 | if (version > 1) { | ||
| 134 | pr_warning("do not understand pg encoding %d > 1", | ||
| 135 | (int)version); | ||
| 136 | return -EINVAL; | ||
| 137 | } | ||
| 138 | |||
| 139 | pgid->pool = ceph_decode_64(p); | ||
| 140 | pgid->seed = ceph_decode_32(p); | ||
| 141 | *p += 4; /* skip deprecated preferred value */ | ||
| 142 | |||
| 143 | return 0; | ||
| 144 | } | ||
| 145 | |||
| 122 | extern struct ceph_osdmap *osdmap_decode(void **p, void *end); | 146 | extern struct ceph_osdmap *osdmap_decode(void **p, void *end); |
| 123 | extern struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, | 147 | extern struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, |
| 124 | struct ceph_osdmap *map, | 148 | struct ceph_osdmap *map, |
| @@ -131,10 +155,8 @@ extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout, | |||
| 131 | u64 *bno, u64 *oxoff, u64 *oxlen); | 155 | u64 *bno, u64 *oxoff, u64 *oxlen); |
| 132 | 156 | ||
| 133 | /* calculate mapping of object to a placement group */ | 157 | /* calculate mapping of object to a placement group */ |
| 134 | extern int ceph_calc_object_layout(struct ceph_pg *pg, | 158 | extern int ceph_calc_ceph_pg(struct ceph_pg *pg, const char *oid, |
| 135 | const char *oid, | 159 | struct ceph_osdmap *osdmap, uint64_t pool); |
| 136 | struct ceph_file_layout *fl, | ||
| 137 | struct ceph_osdmap *osdmap); | ||
| 138 | extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, | 160 | extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, |
| 139 | struct ceph_pg pgid, | 161 | struct ceph_pg pgid, |
| 140 | int *acting); | 162 | int *acting); |
