libceph: generalize ceph_pg_mapping

In preparation for adding support for primary_temp mappings, generalize
struct ceph_pg_mapping so it can hold mappings other than pg_temp.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
This commit is contained in:
Ilya Dryomov 2014-03-21 19:05:29 +02:00 committed by Sage Weil
parent ec7af97258
commit 35a935d75d
3 changed files with 13 additions and 8 deletions

View file

@ -88,9 +88,9 @@ static int osdmap_show(struct seq_file *s, void *p)
seq_printf(s, "pg_temp %llu.%x [", pg->pgid.pool,
pg->pgid.seed);
for (i = 0; i < pg->len; i++)
for (i = 0; i < pg->pg_temp.len; i++)
seq_printf(s, "%s%d", (i == 0 ? "" : ","),
pg->osds[i]);
pg->pg_temp.osds[i]);
seq_printf(s, "]\n");
}