diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 10:07:23 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-25 18:36:25 -0400 |
commit | f81f16339a05775df600b2ff75a79be1864975c1 (patch) | |
tree | 5237e2eb11b48e2ee089591ea9b7695d080c68e6 /net/ceph | |
parent | 6f3bfd45cd233eea0b07e3cabc0386b5de9321d2 (diff) |
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>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/osdmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
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: | |||
1896 | } | 1896 | } |
1897 | 1897 | ||
1898 | /* | 1898 | /* |
1899 | * Return primary osd for given pgid, or -1 if none. | 1899 | * Return acting primary for given PG, or -1 if none. |
1900 | */ | 1900 | */ |
1901 | int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, struct ceph_pg pgid) | 1901 | int ceph_pg_to_acting_primary(struct ceph_osdmap *osdmap, |
1902 | const struct ceph_pg *raw_pgid) | ||
1902 | { | 1903 | { |
1903 | struct ceph_osds up, acting; | 1904 | struct ceph_osds up, acting; |
1904 | 1905 | ||
1905 | ceph_pg_to_up_acting_osds(osdmap, &pgid, &up, &acting); | 1906 | ceph_pg_to_up_acting_osds(osdmap, raw_pgid, &up, &acting); |
1906 | return acting.primary; | 1907 | return acting.primary; |
1907 | } | 1908 | } |
1908 | EXPORT_SYMBOL(ceph_calc_pg_primary); | 1909 | EXPORT_SYMBOL(ceph_pg_to_acting_primary); |