Skip to content

Commit a1f2550

Browse files
authored
Merge pull request #10135 from edgargabriel/topic/info_name_fixes
fs/lustre and fs/pvfs2: fix info names
2 parents 80a88a1 + 1631f38 commit a1f2550

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

ompi/mca/fs/lustre/fs_lustre_file_open.c

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,34 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm,
7676
perm = mca_fs_base_get_file_perm(fh);
7777
amode = mca_fs_base_get_file_amode(fh->f_rank, access_mode);
7878

79-
opal_info_get (info, "stripe_size", &stripe_str, &flag);
79+
opal_info_get (info, "striping_factor", &stripe_str, &flag);
8080
if ( flag ) {
8181
sscanf ( stripe_str->string, "%d", &fs_lustre_stripe_size );
8282
OBJ_RELEASE(stripe_str);
8383
}
84-
85-
opal_info_get (info, "stripe_width", &stripe_str, &flag);
84+
else {
85+
//internal info object name used earlier. Kept for backwards compatibility.
86+
opal_info_get (info, "stripe_size", &stripe_str, &flag);
87+
if ( flag ) {
88+
sscanf ( stripe_str->string, "%d", &fs_lustre_stripe_size );
89+
OBJ_RELEASE(stripe_str);
90+
}
91+
}
92+
93+
opal_info_get (info, "striping_unit", &stripe_str, &flag);
8694
if ( flag ) {
8795
sscanf ( stripe_str->string, "%d", &fs_lustre_stripe_width );
8896
OBJ_RELEASE(stripe_str);
8997
}
90-
98+
else {
99+
//internal info object name used earlier. Kept for backwards compatibility.
100+
opal_info_get (info, "stripe_width", &stripe_str, &flag);
101+
if ( flag ) {
102+
sscanf ( stripe_str->string, "%d", &fs_lustre_stripe_width );
103+
OBJ_RELEASE(stripe_str);
104+
}
105+
}
106+
91107
if (fs_lustre_stripe_size < 0) {
92108
fs_lustre_stripe_size = mca_fs_lustre_stripe_size;
93109
}

ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,35 @@ mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm,
109109
update mca_fs_pvfs2_stripe_width and mca_fs_pvfs2_stripe_size
110110
before calling fake_an_open() */
111111

112-
opal_info_get (info, "stripe_size", &stripe_str, &flag);
112+
opal_info_get (info, "striping_factor", &stripe_str, &flag);
113113
if ( flag ) {
114114
sscanf ( stripe_str->string, "%d", &fs_pvfs2_stripe_size );
115115
OBJ_RELEASE(stripe_str);
116116
}
117+
else {
118+
//internal info object name used earlier. Kept for backwards compatibility.
119+
opal_info_get (info, "stripe_size", &stripe_str, &flag);
120+
if ( flag ) {
121+
sscanf ( stripe_str->string, "%d", &fs_pvfs2_stripe_size );
122+
OBJ_RELEASE(stripe_str);
123+
}
124+
}
117125

118-
opal_info_get (info, "stripe_width", &stripe_str, &flag);
126+
opal_info_get (info, "striping_unit", &stripe_str, &flag);
119127
if ( flag ) {
120128
sscanf ( stripe_str->string, "%d", &fs_pvfs2_stripe_width );
121129
OBJ_RELEASE(stripe_str);
122130
}
131+
else {
132+
//internal info object name used earlier. Kept for backwards compatibility.
133+
opal_info_get (info, "stripe_width", &stripe_str, &flag);
134+
if ( flag ) {
135+
sscanf ( stripe_str->string, "%d", &fs_pvfs2_stripe_width );
136+
OBJ_RELEASE(stripe_str);
137+
}
138+
}
123139

140+
124141
if (fs_pvfs2_stripe_size < 0) {
125142
fs_pvfs2_stripe_size = mca_fs_pvfs2_stripe_size;
126143
}

0 commit comments

Comments
 (0)