1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: static volume filter fn, lvm.conf comment

Change 'lv_passes_volumes_filter' fn back to static as it's not
actually needed in the other code (a remnant from devel version).
Fix lvm.conf comment referencing '--autoactivate' which was finally
decided to be '--activate ay'.
This commit is contained in:
Peter Rajnoha 2012-06-29 10:28:53 +02:00
parent 2cec4b4a77
commit ec8f377748
3 changed files with 8 additions and 11 deletions

View File

@ -550,9 +550,9 @@ activation {
# #
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# If auto_activation_volume_list is defined, each LV that is to be activated # If auto_activation_volume_list is defined, each LV that is to be
# is checked against the list while using the --autoactivate option, and if # activated is checked against the list while using the autoactivation
# it matches, it is activated. # option (--activate ay/-a ay), and if it matches, it is activated.
# "vgname" and "vgname/lvname" are matched exactly. # "vgname" and "vgname/lvname" are matched exactly.
# "@tag" matches any tag set in the LV or VG. # "@tag" matches any tag set in the LV or VG.
# "@*" matches if any tag defined on the host is also set in the LV or VG # "@*" matches if any tag defined on the host is also set in the LV or VG

View File

@ -328,8 +328,8 @@ int activation(void)
return _activation; return _activation;
} }
int lv_passes_volumes_filter(struct cmd_context *cmd, struct logical_volume *lv, static int _lv_passes_volumes_filter(struct cmd_context *cmd, struct logical_volume *lv,
const struct dm_config_node *cn, const char *config_path) const struct dm_config_node *cn, const char *config_path)
{ {
const struct dm_config_value *cv; const struct dm_config_value *cv;
const char *str; const char *str;
@ -427,7 +427,7 @@ static int _passes_activation_filter(struct cmd_context *cmd,
return 0; return 0;
} }
return lv_passes_volumes_filter(cmd, lv, cn, "activation/volume_list"); return _lv_passes_volumes_filter(cmd, lv, cn, "activation/volume_list");
} }
static int _passes_readonly_filter(struct cmd_context *cmd, static int _passes_readonly_filter(struct cmd_context *cmd,
@ -438,7 +438,7 @@ static int _passes_readonly_filter(struct cmd_context *cmd,
if (!(cn = find_config_tree_node(cmd, "activation/read_only_volume_list"))) if (!(cn = find_config_tree_node(cmd, "activation/read_only_volume_list")))
return 0; return 0;
return lv_passes_volumes_filter(cmd, lv, cn, "activation/read_only_volume_list"); return _lv_passes_volumes_filter(cmd, lv, cn, "activation/read_only_volume_list");
} }
@ -452,7 +452,7 @@ int lv_passes_auto_activation_filter(struct cmd_context *cmd, struct logical_vol
return 1; return 1;
} }
return lv_passes_volumes_filter(cmd, lv, cn, "activation/auto_activation_volume_list"); return _lv_passes_volumes_filter(cmd, lv, cn, "activation/auto_activation_volume_list");
} }
int library_version(char *version, size_t size) int library_version(char *version, size_t size)

View File

@ -93,9 +93,6 @@ int lv_check_not_in_use(struct cmd_context *cmd, struct logical_volume *lv,
*/ */
int lv_activation_filter(struct cmd_context *cmd, const char *lvid_s, int lv_activation_filter(struct cmd_context *cmd, const char *lvid_s,
int *activate_lv); int *activate_lv);
int lv_passes_volumes_filter(struct cmd_context *cmd, struct logical_volume *lv,
const struct dm_config_node *cn, const char *config_path);
/* /*
* Checks against the auto_activation_volume_list and * Checks against the auto_activation_volume_list and
* returns 1 if the LV should be activated, 0 otherwise. * returns 1 if the LV should be activated, 0 otherwise.