libceph: pg_upmap[_items] infrastructure
authorIlya Dryomov <idryomov@gmail.com>
Wed, 21 Jun 2017 15:27:18 +0000 (17:27 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 7 Jul 2017 15:25:18 +0000 (17:25 +0200)
commit6f428df47dae2c8ea31fd4c0c74a12a8a5ac2d1d
tree00076a72eda7738433726f6e6bc4ce1644d370f6
parent278b1d709c6acc6f7d138fed775c76695b068e43
libceph: pg_upmap[_items] infrastructure

pg_temp and pg_upmap encodings are the same (PG -> array of osds),
except for the incremental remove: it's an empty mapping in new_pg_temp
for pg_temp and a separate old_pg_upmap set for pg_upmap.  (This isn't
to allow for empty pg_upmap mappings -- apparently, pg_temp just wasn't
looked at as an example for pg_upmap encoding.)

Reuse __decode_pg_temp() for decoding pg_upmap and new_pg_upmap.
__decode_pg_temp() stores into pg_temp union member, but since pg_upmap
union member is identical, reading through pg_upmap later is OK.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/ceph/osdmap.h
net/ceph/debugfs.c
net/ceph/osdmap.c