diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 16:07:23 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-26 00:36:25 +0200 |
commit | f81f16339a05775df600b2ff75a79be1864975c1 (patch) | |
tree | 5237e2eb11b48e2ee089591ea9b7695d080c68e6 | |
parent | 6f3bfd45cd233eea0b07e3cabc0386b5de9321d2 (diff) | |
download | linux-f81f16339a05775df600b2ff75a79be1864975c1.tar.gz linux-f81f16339a05775df600b2ff75a79be1864975c1.tar.bz2 linux-f81f16339a05775df600b2ff75a79be1864975c1.zip |
libceph: rename ceph_calc_pg_primary()
Rename ceph_calc_pg_primary() to ceph_pg_to_acting_primary() to
emphasise that it returns acting primary.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | fs/ceph/ioctl.c | 2 | ||||
-rw-r--r-- | include/linux/ceph/osdmap.h | 4 | ||||
-rw-r--r-- | net/ceph/osdmap.c | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c index cca7fff22725..1831ad6cf066 100644 --- a/fs/ceph/ioctl.c +++ b/fs/ceph/ioctl.c @@ -221,7 +221,7 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) return r; } - dl.osd = ceph_calc_pg_primary(osdc->osdmap, pgid); + dl.osd = ceph_pg_to_acting_primary(osdc->osdmap, &pgid); if (dl.osd >= 0) { struct ceph_entity_addr *a = ceph_osd_addr(osdc->osdmap, dl.osd); diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 942189d311e0..3fd978a1639b 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h @@ -236,8 +236,8 @@ void ceph_pg_to_up_acting_osds(struct ceph_osdmap *osdmap, const struct ceph_pg *raw_pgid, struct ceph_osds *up, struct ceph_osds *acting); -extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, - struct ceph_pg pgid); +int ceph_pg_to_acting_primary(struct ceph_osdmap *osdmap, + const struct ceph_pg *raw_pgid); extern struct ceph_pg_pool_info *ceph_pg_pool_by_id(struct ceph_osdmap *map, u64 id); diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index f5fc8fc63879..656384a8fd1e 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -1896,13 +1896,14 @@ out: } /* - * Return primary osd for given pgid, or -1 if none. + * Return acting primary for given PG, or -1 if none. */ -int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, struct ceph_pg pgid) +int ceph_pg_to_acting_primary(struct ceph_osdmap *osdmap, + const struct ceph_pg *raw_pgid) { struct ceph_osds up, acting; - ceph_pg_to_up_acting_osds(osdmap, &pgid, &up, &acting); + ceph_pg_to_up_acting_osds(osdmap, raw_pgid, &up, &acting); return acting.primary; } -EXPORT_SYMBOL(ceph_calc_pg_primary); +EXPORT_SYMBOL(ceph_pg_to_acting_primary); |