}
/*
- * Given up set, apply pg_temp mapping.
+ * Given up set, apply pg_temp and primary_temp mappings.
*
* Return acting set length. *primary is set to acting primary osd id,
* or -1 if acting set is empty.
temp_primary = *primary;
}
+ /* primary_temp? */
+ pg = __lookup_pg_mapping(&osdmap->primary_temp, pgid);
+ if (pg)
+ temp_primary = pg->primary_temp.osd;
+
*primary = temp_primary;
return temp_len;
}