}
/**
- * Find the first comma delimiter from the specified \a buf and make \a *endh
- * point to the string starting with the comma. The commas in expression list
- * [...] will be skipped.
+ * Find the first delimiter (comma or colon) from the specified \a buf and
+ * make \a *endh point to the string starting with the delimiter. The commas
+ * in expression list [...] will be skipped.
*
- * \param[in] buf a comma-separated string
+ * \param[in] buf a delimiter-separated string
* \param[in] endh a pointer to a pointer that will point to the string
- * starting with the comma
+ * starting with the delimiter
*
- * \retval 0 if comma delimiter is found
- * \retval 1 if comma delimiter is not found
+ * \retval 0 if delimiter is found
+ * \retval 1 if delimiter is not found
*/
-static int lmd_find_comma(char *buf, char **endh)
+static int lmd_find_delimiter(char *buf, char **endh)
{
char *c = buf;
int skip = 0;
else if (*c == ']')
skip--;
- if (*c == ',' && skip == 0) {
+ if ((*c == ',' || *c == ':') && skip == 0) {
if (endh != NULL)
*endh = c;
return 0;
}
/**
- * Find the first valid string delimited by comma from the specified \a buf
- # and parse it to see whether it's a valid nid list. If yes, \a *endh will
- * point to the next string starting with the comma.
+ * Find the first valid string delimited by comma or colon from the specified
+ * \a buf and parse it to see whether it's a valid nid list. If yes, \a *endh
+ * will point to the next string starting with the delimiter.
*
- * \param[in] buf a comma-separated string
+ * \param[in] buf a delimiter-separated string
* \param[in] endh a pointer to a pointer that will point to the string
- * starting with the comma
+ * starting with the delimiter
*
* \retval 0 if the string is a valid nid list
* \retval 1 if the string is not a valid nid list
if (*buf == ' ' || *buf == '/' || *buf == '\0')
return 1;
- if (lmd_find_comma(buf, &endp) != 0)
+ if (lmd_find_delimiter(buf, &endp) != 0)
endp = buf + strlen(buf);
tmp = *endp;
} else if (strncmp(s1, "param=", 6) == 0) {
size_t length, params_length;
char *tail = s1;
- if (lmd_find_comma(s1 + 6, &tail) != 0)
+ if (lmd_find_delimiter(s1 + 6, &tail) != 0)
length = strlen(s1);
else {
char *param_str = tail + 1;
test_77() { # LU-3445
local server_version=$(lustre_version_code $SINGLEMDS)
-
- [[ $server_version -ge $(version_code 2.2.60) ]] &&
- [[ $server_version -le $(version_code 2.4.0) ]] &&
- skip "Need MDS version < 2.2.60 or > 2.4.0" && return
+ [[ $server_version -ge $(version_code 2.8.55) ]] ||
+ { skip "Need MDS version 2.8.55+ "; return; }
if [[ -z "$fs2ost_DEV" || -z "$fs2mds_DEV" ]]; then
is_blkdev $SINGLEMDS $(mdsdevname ${SINGLEMDS//mds/}) &&
error "start fs2mds failed"
mgsnid=$(do_facet fs2mds $LCTL list_nids | xargs | tr ' ' ,)
- [[ $mgsnid = *,* ]] || mgsnid+=",$mgsnid"
+ mgsnid="$mgsnid,$mgsnid:$mgsnid"
add fs2ost $(mkfs_opts ost1 $fs2ostdev) --mgsnode=$mgsnid \
--failnode=$failnid --fsname=$fsname \