Searched refs:osdmap (Results 1 - 12 of 12) sorted by relevance

/linux-4.4.14/net/ceph/
H A DMakefile8 osd_client.o osdmap.o crush/crush.o crush/mapper.o crush/hash.o \
H A Dosdmap.c9 #include <linux/ceph/osdmap.h>
784 /* old osdmap enconding */ get_osdmap_client_data_v()
1155 dout("full osdmap epoch %d max_osd %d\n", map->epoch, map->max_osd); osdmap_decode()
1161 pr_err("corrupt full osdmap (%d) epoch %d off %d (%p of %p-%p)\n", osdmap_decode()
1163 print_hex_dump(KERN_DEBUG, "osdmap: ", osdmap_decode()
1359 dout("inc osdmap epoch %d max_osd %d\n", map->epoch, map->max_osd); osdmap_apply_incremental()
1365 pr_err("corrupt inc osdmap (%d) epoch %d off %d (%p of %p-%p)\n", osdmap_apply_incremental()
1367 print_hex_dump(KERN_DEBUG, "osdmap: ", osdmap_apply_incremental()
1453 int ceph_oloc_oid_to_pg(struct ceph_osdmap *osdmap, ceph_oloc_oid_to_pg() argument
1460 pi = __lookup_pg_pool(&osdmap->pg_pools, oloc->pool); ceph_oloc_oid_to_pg()
1495 static int pg_to_raw_osds(struct ceph_osdmap *osdmap, pg_to_raw_osds() argument
1503 ruleno = crush_find_rule(osdmap->crush, pool->crush_ruleset, pg_to_raw_osds()
1512 len = do_crush(osdmap, ruleno, pps, osds, pg_to_raw_osds()
1514 osdmap->osd_weight, osdmap->max_osd); pg_to_raw_osds()
1531 static int raw_to_up_osds(struct ceph_osdmap *osdmap, raw_to_up_osds() argument
1542 if (ceph_osd_is_down(osdmap, osds[i])) { raw_to_up_osds()
1555 if (ceph_osd_is_down(osdmap, osds[i])) raw_to_up_osds()
1566 static void apply_primary_affinity(struct ceph_osdmap *osdmap, u32 pps, apply_primary_affinity() argument
1577 if (!osdmap->osd_primary_affinity) apply_primary_affinity()
1584 osdmap->osd_primary_affinity[osd] != apply_primary_affinity()
1604 aff = osdmap->osd_primary_affinity[osd]; apply_primary_affinity()
1639 static int apply_temps(struct ceph_osdmap *osdmap, apply_temps() argument
1653 pg = __lookup_pg_mapping(&osdmap->pg_temp, pgid); apply_temps()
1659 if (ceph_osd_is_down(osdmap, pg->pg_temp.osds[i])) { apply_temps()
1682 pg = __lookup_pg_mapping(&osdmap->primary_temp, pgid); apply_temps()
1696 int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, struct ceph_pg pgid, ceph_calc_pg_acting() argument
1703 pool = __lookup_pg_pool(&osdmap->pg_pools, pgid.pool); ceph_calc_pg_acting()
1727 len = pg_to_raw_osds(osdmap, pool, pgid, pps, osds); ceph_calc_pg_acting()
1733 len = raw_to_up_osds(osdmap, pool, osds, len, primary); ceph_calc_pg_acting()
1735 apply_primary_affinity(osdmap, pps, pool, osds, len, primary); ceph_calc_pg_acting()
1737 len = apply_temps(osdmap, pool, pgid, osds, len, primary); ceph_calc_pg_acting()
1745 int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, struct ceph_pg pgid) ceph_calc_pg_primary() argument
1750 ceph_calc_pg_acting(osdmap, pgid, osds, &primary); ceph_calc_pg_primary()
H A Ddebugfs.c21 * .../osdmap - current osdmap
57 struct ceph_osdmap *map = client->osdc.osdmap; osdmap_show()
121 seq_printf(s, "have osdmap %u\n", (unsigned int)monc->have_osdmap); monc_show()
123 seq_printf(s, "want next osdmap\n"); monc_show()
252 client->debugfs_osdmap = debugfs_create_file("osdmap", ceph_debugfs_client_init()
H A Dosd_client.c1155 peer_addr = &osdc->osdmap->osd_addr[osd->o_osd]; __reset_osd()
1340 * based on the current osdmap and osd_client settings.
1347 bool pauserd = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD); __req_should_be_paused()
1348 bool pausewr = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR) || __req_should_be_paused()
1349 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL); __req_should_be_paused()
1357 static int __calc_request_pg(struct ceph_osdmap *osdmap, __calc_request_pg() argument
1377 pi = ceph_pg_pool_by_id(osdmap, req->r_target_oloc.pool); __calc_request_pg()
1389 return ceph_oloc_oid_to_pg(osdmap, &req->r_target_oloc, __calc_request_pg()
1430 err = __calc_request_pg(osdc->osdmap, req, &pgid); __map_request()
1437 num = ceph_calc_pg_acting(osdc->osdmap, pgid, acting, &o); __map_request()
1484 &osdc->osdmap->osd_addr[o]); __map_request()
1507 put_unaligned_le32(osdc->osdmap->epoch, req->r_request_osdmap_epoch); __send_request()
1861 * list, waiting for the new osdmap (which can take handle_reply()
1956 if (!ceph_osd_is_up(osdc->osdmap, osd->o_osd) || reset_changed_osds()
1958 ceph_osd_addr(osdc->osdmap, reset_changed_osds()
2083 dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0); ceph_osdc_handle_map()
2095 was_full = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL); ceph_osdc_handle_map()
2106 if (osdc->osdmap && osdc->osdmap->epoch+1 == epoch) { ceph_osdc_handle_map()
2110 osdc->osdmap, ceph_osdc_handle_map()
2117 if (newmap != osdc->osdmap) { ceph_osdc_handle_map()
2118 ceph_osdmap_destroy(osdc->osdmap); ceph_osdc_handle_map()
2119 osdc->osdmap = newmap; ceph_osdc_handle_map()
2122 ceph_osdmap_flag(osdc->osdmap, ceph_osdc_handle_map()
2146 } else if (osdc->osdmap && osdc->osdmap->epoch >= epoch) { ceph_osdc_handle_map()
2149 osdc->osdmap->epoch); ceph_osdc_handle_map()
2160 oldmap = osdc->osdmap; ceph_osdc_handle_map()
2161 osdc->osdmap = newmap; ceph_osdc_handle_map()
2168 ceph_osdmap_flag(osdc->osdmap, ceph_osdc_handle_map()
2176 if (!osdc->osdmap) ceph_osdc_handle_map()
2180 ceph_monc_got_osdmap(&osdc->client->monc, osdc->osdmap->epoch); ceph_osdc_handle_map()
2183 * subscribe to subsequent osdmap updates if full to ensure ceph_osdc_handle_map()
2187 if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) || ceph_osdc_handle_map()
2188 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD) || ceph_osdc_handle_map()
2189 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR)) ceph_osdc_handle_map()
2615 osdc->osdmap = NULL; ceph_osdc_init()
2678 if (osdc->osdmap) { ceph_osdc_stop()
2679 ceph_osdmap_destroy(osdc->osdmap); ceph_osdc_stop()
2680 osdc->osdmap = NULL; ceph_osdc_stop()
H A Dmon_client.c193 * Send subscribe request for mdsmap and/or osdmap.
214 dout("__send_subscribe to 'osdmap' %u\n", __send_subscribe()
216 ceph_encode_string(&p, end, "osdmap", 6); __send_subscribe()
296 * Register interest in the next osdmap
311 * Wait for an osdmap with a given epoch.
672 * @what: one of "mdsmap", "osdmap" or "monmap"
H A Dceph_common.c658 client->osdc.osdmap && client->osdc.osdmap->epoch; have_mon_and_osd_map()
/linux-4.4.14/include/linux/ceph/
H A Dosdmap.h207 extern int ceph_oloc_oid_to_pg(struct ceph_osdmap *osdmap,
212 extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap,
215 extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap,
H A Dosd_client.h10 #include <linux/ceph/osdmap.h>
205 struct ceph_osdmap *osdmap; /* current map */ member in struct:ceph_osd_client
/linux-4.4.14/fs/ceph/
H A Dioctl.c218 r = ceph_oloc_oid_to_pg(osdc->osdmap, &oloc, &oid, &pgid); ceph_ioctl_get_dataloc()
224 dl.osd = ceph_calc_pg_primary(osdc->osdmap, pgid); ceph_ioctl_get_dataloc()
227 ceph_osd_addr(osdc->osdmap, dl.osd); ceph_ioctl_get_dataloc()
H A Dfile.c1049 if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL)) { ceph_write_iter()
1141 ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_NEARFULL))) { ceph_write_iter()
1373 if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) && ceph_fallocate()
H A Dxattr.c79 pool_name = ceph_pg_pool_name_by_id(osdc->osdmap, pool); ceph_vxattrcb_layout()
145 pool_name = ceph_pg_pool_name_by_id(osdc->osdmap, pool); ceph_vxattrcb_layout_pool()
/linux-4.4.14/drivers/block/
H A Drbd.c4550 pool_name = ceph_pg_pool_name_by_id(osdc->osdmap, spec->pool_id); rbd_spec_fill_names()
4983 ret = ceph_pg_poolid_by_name(rbdc->client->osdc.osdmap, pool_name); rbd_add_get_pool_id()
4985 ret = ceph_monc_do_get_version(&rbdc->client->monc, "osdmap", rbd_add_get_pool_id()
4990 if (rbdc->client->osdc.osdmap->epoch < newest_epoch) { rbd_add_get_pool_id()
4997 /* the osdmap we have is new enough */ rbd_add_get_pool_id()

Completed in 281 milliseconds