1
0
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:
Alasdair Kergon
2007-11-09 16:51:54 +00:00
parent 954626f157
commit c0eff8a07f
23 changed files with 168 additions and 29 deletions

View File

@@ -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;
}