mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-10 13:47:27 +00:00
Allow setting orphan_scan_delay_ms option
The orphan_scan_delay_ms option setting code mistakenly set the default before testing the option for -1 (not the default) to discover if multiple options had been set. This made any attempt to set fail. Initialize the option to -1 so the first set succeeds and apply the default if we don't set the value. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -114,7 +114,7 @@ static void init_default_options(struct scoutfs_mount_options *opts)
|
||||
{
|
||||
memset(opts, 0, sizeof(*opts));
|
||||
opts->quorum_slot_nr = -1;
|
||||
opts->orphan_scan_delay_ms = DEFAULT_ORPHAN_SCAN_DELAY_MS;
|
||||
opts->orphan_scan_delay_ms = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -193,6 +193,9 @@ static int parse_options(struct super_block *sb, char *options, struct scoutfs_m
|
||||
}
|
||||
}
|
||||
|
||||
if (opts->orphan_scan_delay_ms == -1)
|
||||
opts->orphan_scan_delay_ms = DEFAULT_ORPHAN_SCAN_DELAY_MS;
|
||||
|
||||
if (!opts->metadev_path) {
|
||||
scoutfs_err(sb, "Required mount option \"metadev_path\" not found");
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user