main - move code from pvscan.c to online.c
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f40fd88374fe1e911233e5a4fc79223d97decde0 Commit: f40fd88374fe1e911233e5a4fc79223d97decde0 Parent: d558b3ad7e6086480075b3bf750eba0ee66c78ec Author: David Teigland <[email protected]> AuthorDate: Wed Nov 3 16:02:38 2021 -0500 Committer: David Teigland <[email protected]> CommitterDate: Thu Nov 4 11:09:29 2021 -0500
move code from pvscan.c to online.c
related to managing files in /run/lvm/pvs_online
and /run/lvm/vgs_online
--- lib/Makefile.in | 1 + lib/commands/toolcontext.h | 1 + lib/device/online.c | 306 ++++++++++++++++++++++++++++++++++++++ lib/device/online.h | 46 ++++++ lib/label/hints.c | 3 +- tools/lvmcmdline.c | 4 +- tools/pvscan.c | 360 ++++----------------------------------------- tools/toollib.c | 1 + tools/tools.h | 2 - 9 files changed, 384 insertions(+), 340 deletions(-)
lib/Makefile.in +1 -0
@@ -40,6 +40,7 @@ SOURCES =\ device/dev-luks.c \ device/dev-dasd.c \ device/dev-lvm1-pool.c \ + device/online.c \ display/display.c \ error/errseg.c \ unknown/unknown.c \
lib/commands/toolcontext.h +1 -0
@@ -202,6 +202,7 @@ struct cmd_context { unsigned ignore_device_name_mismatch:1; /* skip updating devices file names */ unsigned backup_disabled:1; /* skip repeated debug message */ unsigned event_activation:1; /* whether event_activation is set */ + unsigned udevoutput:1;/* * Devices and filtering.
lib/device/online.c new file +306 -0
306 lines not on this page · raw message
lib/device/online.h new file +46 -0
46 lines not on this page · raw message
lib/label/hints.c +1 -2
@@ -146,6 +146,7 @@#include "lib/label/hints.h" #include "lib/device/dev-type.h" #include "lib/device/device_id.h" +#include "lib/device/online.h" #include <sys/stat.h> #include <fcntl.h>
@@ -156,8 +157,6 @@#include <sys/file.h> #include <sys/sysmacros.h> -int online_pvid_file_read (char *path,int *major,int *minor,char *vgname); -static const char *_hints_file =DEFAULT_RUN_DIR "/hints" ;static const char *_nohints_file =DEFAULT_RUN_DIR "/nohints" ;static const char *_newhints_file =DEFAULT_RUN_DIR "/newhints" ;
tools/lvmcmdline.c +3 -1
@@ -2393,8 +2393,10 @@ static void _reset_current_settings_to_default(struct cmd_context *cmd)static void _get_current_output_settings_from_args (struct cmd_context *cmd) { -if (arg_is_set (cmd, udevoutput_ARG)) +if (arg_is_set (cmd, udevoutput_ARG)) { cmd->current_settings.suppress =1 ; + cmd->udevoutput =1 ; + }if (arg_is_set (cmd, debug_ARG)) cmd->current_settings.debug = _LOG_FATAL + (arg_count (cmd, debug_ARG) -1 );
tools/pvscan.c +25 -335
511 lines not on this page · raw message
tools/toollib.c +1 -0
@@ -17,6 +17,7 @@#include "lib/format_text/format-text.h" #include "lib/label/hints.h" #include "lib/device/device_id.h" +#include "lib/device/online.h" #include <sys/stat.h> #include <signal.h>
tools/tools.h +0 -2
@@ -295,6 +295,4 @@ int lvconvert_cachevol_attach_single(struct cmd_context *cmd,struct logical_volume *lv, struct processing_handle *handle); -void online_vg_file_remove (const char *vgname); -#endif