mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
remove unneded check to skip filter init
There's no more persistent filter so we don't need to check for it.
This commit is contained in:
parent
0aeca60aaa
commit
1365f0d4c8
@ -131,7 +131,6 @@ static inline int configtype_arg(struct cmd_context *cmd __attribute__((unused))
|
||||
#define ALLOW_UUID_AS_NAME 0x00000010
|
||||
#define LOCKD_VG_SH 0x00000020
|
||||
#define NO_METADATA_PROCESSING 0x00000040
|
||||
#define IGNORE_PERSISTENT_FILTER 0x00000080
|
||||
#define MUST_USE_ALL_ARGS 0x00000100
|
||||
#define ENABLE_DUPLICATE_DEVS 0x00000400
|
||||
#define DISALLOW_TAG_ARGS 0x00000800
|
||||
|
@ -149,7 +149,7 @@ xx(pvs,
|
||||
|
||||
xx(pvscan,
|
||||
"List all physical volumes",
|
||||
PERMITTED_READ_ONLY | LOCKD_VG_SH | IGNORE_PERSISTENT_FILTER)
|
||||
PERMITTED_READ_ONLY | LOCKD_VG_SH)
|
||||
|
||||
xx(segtypes,
|
||||
"List available segment types",
|
||||
@ -232,7 +232,7 @@ xx(vgs,
|
||||
|
||||
xx(vgscan,
|
||||
"Search for all volume groups",
|
||||
PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | IGNORE_PERSISTENT_FILTER)
|
||||
PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH)
|
||||
|
||||
xx(vgsplit,
|
||||
"Move physical volumes into a new or existing volume group",
|
||||
|
@ -2731,11 +2731,6 @@ static int _cmd_no_meta_proc(struct cmd_context *cmd)
|
||||
return cmd->cname->flags & NO_METADATA_PROCESSING;
|
||||
}
|
||||
|
||||
static int _cmd_ignores_persistent_filter(struct cmd_context *cmd)
|
||||
{
|
||||
return cmd->cname->flags & IGNORE_PERSISTENT_FILTER;
|
||||
}
|
||||
|
||||
int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
struct dm_config_tree *config_string_cft, *config_profile_command_cft, *config_profile_metadata_cft;
|
||||
@ -2860,13 +2855,8 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
|
||||
if (!cmd->initialized.connections && !_cmd_no_meta_proc(cmd) && !init_connections(cmd))
|
||||
return_ECMD_FAILED;
|
||||
|
||||
/* Note: Load persistent cache only if we haven't refreshed toolcontext!
|
||||
* If toolcontext has been refreshed, it means config has changed
|
||||
* and we can't rely on persistent cache anymore.
|
||||
* Similarly ignore the persistent cache if the command is going to discard it regardless.
|
||||
*/
|
||||
if (!cmd->initialized.filters && !_cmd_no_meta_proc(cmd) &&
|
||||
!init_filters(cmd, !(refresh_done || _cmd_ignores_persistent_filter(cmd))))
|
||||
!init_filters(cmd, !refresh_done))
|
||||
return_ECMD_FAILED;
|
||||
|
||||
if (arg_is_set(cmd, readonly_ARG))
|
||||
|
@ -123,8 +123,6 @@ struct arg_value_group_list {
|
||||
#define LOCKD_VG_SH 0x00000020
|
||||
/* Command does not process any metadata. */
|
||||
#define NO_METADATA_PROCESSING 0x00000040
|
||||
/* Command must not load the contents saved by the persistent filter */
|
||||
#define IGNORE_PERSISTENT_FILTER 0x00000080
|
||||
/* Command must use all specified arg names and fail if all cannot be used. */
|
||||
#define MUST_USE_ALL_ARGS 0x00000100
|
||||
/* Command should process unused duplicate devices. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user