Motr  M0
parity_repair.h File Reference
#include "layout/pdclust.h"
#include "fid/fid.h"
#include "pool/pool.h"
Include dependency graph for parity_repair.h:

Go to the source code of this file.

Macros

#define __MOTR_SNS_PARITY_REPAIR_H__
 

Functions

M0_INTERNAL int m0_sns_repair_spare_map (struct m0_poolmach *pm, const struct m0_fid *fid, struct m0_pdclust_layout *pl, struct m0_pdclust_instance *pi, uint64_t group_number, uint64_t unit_number, uint32_t *spare_slot_out, uint32_t *spare_slot_out_prev)
 
M0_INTERNAL int m0_sns_repair_spare_rebalancing (struct m0_poolmach *pm, const struct m0_fid *fid, struct m0_pdclust_layout *pl, struct m0_pdclust_instance *pi, uint64_t group, uint64_t unit, uint32_t *spare_slot_out, uint32_t *spare_slot_out_prev)
 
M0_INTERNAL int m0_sns_repair_data_map (struct m0_poolmach *pm, struct m0_pdclust_layout *pl, struct m0_pdclust_instance *pi, uint64_t group_number, uint64_t spare_unit_number, uint64_t *data_unit_id_out)
 

Macro Definition Documentation

◆ __MOTR_SNS_PARITY_REPAIR_H__

#define __MOTR_SNS_PARITY_REPAIR_H__

Definition at line 25 of file parity_repair.h.

Function Documentation

◆ m0_sns_repair_data_map()

M0_INTERNAL int m0_sns_repair_data_map ( struct m0_poolmach pm,
struct m0_pdclust_layout pl,
struct m0_pdclust_instance pi,
uint64_t  group_number,
uint64_t  spare_unit_number,
uint64_t *  data_unit_id_out 
)

Map the {spare slot, data/parity unit id} pair after repair.

Parameters
pmpool machine.
fidGlobal file id.
plpdclust layout instance.
group_numberParity group number for a given file.
unit_numberSpare unit number in the parity group.
data_unit_id_outthe output data unit index.

Definition at line 192 of file parity_repair.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_sns_repair_spare_map()

M0_INTERNAL int m0_sns_repair_spare_map ( struct m0_poolmach pm,
const struct m0_fid fid,
struct m0_pdclust_layout pl,
struct m0_pdclust_instance pi,
uint64_t  group_number,
uint64_t  unit_number,
uint32_t *  spare_slot_out,
uint32_t *  spare_slot_out_prev 
)

Map the {failed device, spare slot} pair of a specified device.

Parameters
pmpool machine.
fidGlobal file id.
plpdclust layout instance.
group_numberParity group number for a given file.
unit_numberUnit number in the parity group.
spare_slot_outthe output spare slot.
spare_slot_out_prevthe previous spare slot (in case of cascaded failures) Contains unit number in case of single failure.

Definition at line 103 of file parity_repair.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_sns_repair_spare_rebalancing()

M0_INTERNAL int m0_sns_repair_spare_rebalancing ( struct m0_poolmach pm,
const struct m0_fid fid,
struct m0_pdclust_layout pl,
struct m0_pdclust_instance pi,
uint64_t  group,
uint64_t  unit,
uint32_t *  spare_slot_out,
uint32_t *  spare_slot_out_prev 
)

Definition at line 115 of file parity_repair.c.

Here is the call graph for this function:
Here is the caller graph for this function: