Skip to content

Commit

Permalink
DAOS-16897 object: add N+3 EC object class
Browse files Browse the repository at this point in the history
Required-githooks: true

Signed-off-by: Wang Shilong <[email protected]>
  • Loading branch information
wangshilong committed Dec 28, 2024
1 parent 41a05cf commit c4b3e71
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 171 deletions.
39 changes: 39 additions & 0 deletions src/include/daos_obj_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ enum daos_obj_redun {
* Examples:
* - 2P1: 2+1 EC object
* - 4P2: 4+2 EC object
* - 4P3: 4+3 EC object
* - 8P2: 8+2 EC object
* - 8P3: 8+3 EC object
* - 16P2: 16+2 EC object
* - 16P3: 16+3 EC object
*/
OR_RS_2P1 = 32,
OR_RS_2P2,
Expand All @@ -71,6 +74,9 @@ enum daos_obj_redun {
OR_RS_8P2,
OR_RS_16P1,
OR_RS_16P2,
OR_RS_4P3,
OR_RS_8P3,
OR_RS_16P3,

/*
* Predefined object classes that can be used directly by the API user.
Expand Down Expand Up @@ -340,6 +346,17 @@ enum daos_obj_redun {
OC_EC_4P2G32 = OBJ_CLASS_DEF(OR_RS_4P2, 32ULL),
OC_EC_4P2GX = OBJ_CLASS_DEF(OR_RS_4P2, MAX_NUM_GROUPS),

/** EC 4+3 object classes */
OC_EC_4P3G1 = OBJ_CLASS_DEF(OR_RS_4P3, 1ULL),
OC_EC_4P3G2 = OBJ_CLASS_DEF(OR_RS_4P3, 2ULL),
OC_EC_4P3G4 = OBJ_CLASS_DEF(OR_RS_4P3, 4ULL),
OC_EC_4P3G6 = OBJ_CLASS_DEF(OR_RS_4P3, 6ULL),
OC_EC_4P3G8 = OBJ_CLASS_DEF(OR_RS_4P3, 8ULL),
OC_EC_4P3G12 = OBJ_CLASS_DEF(OR_RS_4P3, 12ULL),
OC_EC_4P3G16 = OBJ_CLASS_DEF(OR_RS_4P3, 16ULL),
OC_EC_4P3G32 = OBJ_CLASS_DEF(OR_RS_4P3, 32ULL),
OC_EC_4P3GX = OBJ_CLASS_DEF(OR_RS_4P3, MAX_NUM_GROUPS),

/** EC 8+1 object classes */
OC_EC_8P1G1 = OBJ_CLASS_DEF(OR_RS_8P1, 1ULL),
OC_EC_8P1G2 = OBJ_CLASS_DEF(OR_RS_8P1, 2ULL),
Expand All @@ -362,6 +379,17 @@ enum daos_obj_redun {
OC_EC_8P2G32 = OBJ_CLASS_DEF(OR_RS_8P2, 32ULL),
OC_EC_8P2GX = OBJ_CLASS_DEF(OR_RS_8P2, MAX_NUM_GROUPS),

/** EC 8+3 object classes */
OC_EC_8P3G1 = OBJ_CLASS_DEF(OR_RS_8P3, 1ULL),
OC_EC_8P3G2 = OBJ_CLASS_DEF(OR_RS_8P3, 2ULL),
OC_EC_8P3G4 = OBJ_CLASS_DEF(OR_RS_8P3, 4ULL),
OC_EC_8P3G6 = OBJ_CLASS_DEF(OR_RS_8P3, 6ULL),
OC_EC_8P3G8 = OBJ_CLASS_DEF(OR_RS_8P3, 8ULL),
OC_EC_8P3G12 = OBJ_CLASS_DEF(OR_RS_8P3, 12ULL),
OC_EC_8P3G16 = OBJ_CLASS_DEF(OR_RS_8P3, 16ULL),
OC_EC_8P3G32 = OBJ_CLASS_DEF(OR_RS_8P3, 32ULL),
OC_EC_8P3GX = OBJ_CLASS_DEF(OR_RS_8P3, MAX_NUM_GROUPS),

/** EC 16+1 object classes */
OC_EC_16P1G1 = OBJ_CLASS_DEF(OR_RS_16P1, 1ULL),
OC_EC_16P1G2 = OBJ_CLASS_DEF(OR_RS_16P1, 2ULL),
Expand All @@ -384,6 +412,17 @@ enum daos_obj_redun {
OC_EC_16P2G32 = OBJ_CLASS_DEF(OR_RS_16P2, 32ULL),
OC_EC_16P2GX = OBJ_CLASS_DEF(OR_RS_16P2, MAX_NUM_GROUPS),

/** EC 16+3 object classes */
OC_EC_16P3G1 = OBJ_CLASS_DEF(OR_RS_16P3, 1ULL),
OC_EC_16P3G2 = OBJ_CLASS_DEF(OR_RS_16P3, 2ULL),
OC_EC_16P3G4 = OBJ_CLASS_DEF(OR_RS_16P3, 4ULL),
OC_EC_16P3G6 = OBJ_CLASS_DEF(OR_RS_16P3, 6ULL),
OC_EC_16P3G8 = OBJ_CLASS_DEF(OR_RS_16P3, 8ULL),
OC_EC_16P3G12 = OBJ_CLASS_DEF(OR_RS_16P3, 12ULL),
OC_EC_16P3G16 = OBJ_CLASS_DEF(OR_RS_16P3, 16ULL),
OC_EC_16P3G32 = OBJ_CLASS_DEF(OR_RS_16P3, 32ULL),
OC_EC_16P3GX = OBJ_CLASS_DEF(OR_RS_16P3, MAX_NUM_GROUPS),

/** Class ID equal or higher than this is reserved */
OC_RESERVED = 1 << 30,

Expand Down
Loading

0 comments on commit c4b3e71

Please sign in to comment.