Do not revert the flags to min_mask if passed an empty string
to the function.
Remove exclusion of the changelog_mask parameter from test_133g
as it no longer needs to be skipped.
The change initializes the new mask to the existing mask and only
re-sets it to use min_mask iff the first token in the string is a
'-' or '+'. This fixes a bug where if you were to pass an empty
string to this function it would reset the flags to min_mask.
With this change the flags will be left unchanged.
The only way curently for a user to invoke this function is via
the set_param param command.
That command does check for and will abort if the user tries to
specify "" before calling into cfs_str2mask() thus preventing the
issue in LU-4922 from triggering.
Signed-off-by: Ronnie Sahlberg <rsahlberg@whamcloud.com>
Change-Id: Ibe43509cbdec250e395e35648d399167026a1a14
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56619
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
u64 *oldmask, u64 minmask, u64 allmask, u64 defmask)
{
const char *debugstr;
- u64 newmask = minmask, found = 0;
+ u64 newmask = *oldmask, found = 0;
ENTRY;
/* <str> must be a list of tokens separated by whitespace or comma,
break;
if (*str == '+' || *str == '-') {
op = *str++;
- if (!found)
- /* only if first token is relative */
- newmask = *oldmask;
while (isspace(*str))
str++;
if (*str == 0) /* trailing op */
return -EINVAL;
- }
+ } else if (!found)
+ newmask = minmask;
+
/* find token length */
for (len = 0; str[len] != 0 && !isspace(str[len]) &&
local proc_dirs=$(eval \ls -d $proc_regexp 2>/dev/null)
local proc_dirs_str=$(eval echo $proc_dirs)
- local skipped_params="'force_lbug|changelog_mask|daemon_file'"
+ local skipped_params="'force_lbug|daemon_file'"
local facet
for facet in mds1 ost1; do
local facet_ver=$(lustre_version_code $facet)