@@ -47,6 +47,15 @@ int mca_fs_lustre_priority = 20;
47
47
int mca_fs_lustre_stripe_size = 0 ;
48
48
int mca_fs_lustre_stripe_width = 0 ;
49
49
int mca_fs_lustre_lock_algorithm = 0 ; /* auto */
50
+
51
+ static const mca_base_var_enum_value_t ompi_fs_lustre_lock_algorithm_modes [] = {
52
+ {.value = 0 , .string = "auto" },
53
+ {.value = 1 , .string = "skip locking" },
54
+ {.value = 2 , .string = "always lock entire file" },
55
+ {.value = 3 , .string = "lock specific ranges" },
56
+ {.string = NULL },
57
+ };
58
+
50
59
/*
51
60
* Instantiate the public struct with all of our public information
52
61
* and pointers to our public functions in it
@@ -77,6 +86,8 @@ mca_fs_base_component_2_0_0_t mca_fs_lustre_component = {
77
86
static int
78
87
lustre_register (void )
79
88
{
89
+ mca_base_var_enum_t * new_enum ;
90
+
80
91
mca_fs_lustre_priority = 20 ;
81
92
(void ) mca_base_component_var_register (& mca_fs_lustre_component .fsm_version ,
82
93
"priority" , "Priority of the lustre fs component" ,
@@ -95,15 +106,18 @@ lustre_register(void)
95
106
MCA_BASE_VAR_TYPE_INT , NULL , 0 , 0 ,
96
107
OPAL_INFO_LVL_9 ,
97
108
MCA_BASE_VAR_SCOPE_READONLY , & mca_fs_lustre_stripe_width );
109
+
110
+ (void ) mca_base_var_enum_create ("mca_fs_lustre_lock_algorithm" , ompi_fs_lustre_lock_algorithm_modes , & new_enum );
111
+
98
112
mca_fs_lustre_lock_algorithm = 0 ;
99
113
(void ) mca_base_component_var_register (& mca_fs_lustre_component .fsm_version ,
100
- "lock_algorithm" , "Locking algorithm used by the fs ufs component. "
101
- " 0: auto (default), 1: skip locking, 2: always lock entire file, "
102
- "3: lock only specific ranges" ,
103
- MCA_BASE_VAR_TYPE_INT , NULL , 0 , 0 ,
114
+ "lock_algorithm" , "Locking algorithm used by the fs lustre component. "
115
+ "(default: auto)" ,
116
+ MCA_BASE_VAR_TYPE_INT , new_enum , 0 , 0 ,
104
117
OPAL_INFO_LVL_9 ,
105
118
MCA_BASE_VAR_SCOPE_READONLY ,
106
- & mca_fs_lustre_lock_algorithm );
119
+ & mca_fs_lustre_lock_algorithm );
120
+ OBJ_RELEASE (new_enum );
107
121
108
122
return OMPI_SUCCESS ;
109
123
}
0 commit comments