If the on-disk locator is undefined (upgrade of an old cluster?) initialize
the oloc fields based on the PG::Info.
Reported-by: ar Fred <ar.fred@yahoo.com>
Tested-by: ar Fred <ar.fred@yahoo.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
}
else {
object_info_t oi(bv);
+
+ // if the on-disk oloc is bad/undefined, set up the pool value
+ if (oi.oloc.get_pool() < 0) {
+ oi.oloc.pool = info.pgid.pool();
+ oi.oloc.preferred = info.pgid.preferred();
+ }
+
SnapSetContext *ssc = NULL;
if (can_create)
ssc = get_snapset_context(soid.oid, true);