mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-07 15:33:21 +03:00
Enhance the management of readahead settings.
This commit is contained in:
@@ -153,6 +153,7 @@ static void _init_logging(struct cmd_context *cmd)
|
||||
static int _process_config(struct cmd_context *cmd)
|
||||
{
|
||||
mode_t old_umask;
|
||||
const char *read_ahead;
|
||||
|
||||
/* umask */
|
||||
cmd->default_settings.umask = find_config_tree_int(cmd,
|
||||
@@ -207,6 +208,16 @@ static int _process_config(struct cmd_context *cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
read_ahead = find_config_tree_str(cmd, "activation/readahead", DEFAULT_READ_AHEAD);
|
||||
if (!strcasecmp(read_ahead, "auto"))
|
||||
cmd->default_settings.read_ahead = DM_READ_AHEAD_AUTO;
|
||||
else if (!strcasecmp(read_ahead, "none"))
|
||||
cmd->default_settings.read_ahead = DM_READ_AHEAD_NONE;
|
||||
else {
|
||||
log_error("Invalid readahead specification");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user