File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -309,15 +309,16 @@ type MRFStatus struct {
309309
310310// BgHealState represents the status of the background heal
311311type BgHealState struct {
312+ // Total items scanned by the continous background healing
312313 ScannedItemsCount int64
313-
314+ // Disks currently in heal states
314315 HealDisks []string
315-
316316 // SetStatus contains information for each set.
317317 Sets []SetStatus `json:"sets"`
318-
319318 // Endpoint -> MRF Status
320319 MRF map [string ]MRFStatus `json:"mrf"`
320+ // Parity per storage class
321+ SCParity map [string ]int `json:"sc_parity"`
321322}
322323
323324// SetStatus contains information about the heal status of a set.
@@ -370,6 +371,14 @@ type HealingDisk struct {
370371
371372// Merge others into b.
372373func (b * BgHealState ) Merge (others ... BgHealState ) {
374+ // SCParity is the same from all nodes, just pick
375+ // the information from the first node.
376+ if b .SCParity == nil && len (others ) > 0 {
377+ b .SCParity = make (map [string ]int )
378+ for k , v := range others [0 ].SCParity {
379+ b .SCParity [k ] = v
380+ }
381+ }
373382 if b .MRF == nil {
374383 b .MRF = make (map [string ]MRFStatus )
375384 }
You can’t perform that action at this time.
0 commit comments