diff options
author | Alasdair Kergon <agk@redhat.com> | 2006-05-11 18:39:24 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2006-05-11 18:39:24 +0000 |
commit | 5c9d70c9559470017e1dd3433280f8e76bcb2e52 (patch) | |
tree | 8b493e0ca87bd6ac9a76327adf33abc569585f66 /lib/log | |
parent | 898e6f8e419c6d0a86d1a0fd12073fed05f6319c (diff) | |
download | lvm2-5c9d70c9559470017e1dd3433280f8e76bcb2e52.tar.gz lvm2-5c9d70c9559470017e1dd3433280f8e76bcb2e52.tar.xz lvm2-5c9d70c9559470017e1dd3433280f8e76bcb2e52.zip |
Create a log header for replacement in-sync mirror log.
Use set_lv() and dev_set() to wipe sections of devices.
Add mirror_in_sync() flag to avoid unnecessary resync on activation.
Diffstat (limited to 'lib/log')
-rw-r--r-- | lib/log/log.c | 11 | ||||
-rw-r--r-- | lib/log/log.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/log/log.c b/lib/log/log.c index 80501f97..08673daf 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -45,6 +45,7 @@ static int _security_level = SECURITY_LEVEL; static char _cmd_name[30] = ""; static char _msg_prefix[30] = " "; static int _already_logging = 0; +static int _mirror_in_sync = 0; static lvm2_log_fn_t _lvm2_log_fn = NULL; @@ -175,6 +176,11 @@ void init_security_level(int level) _security_level = level; } +void init_mirror_in_sync(int in_sync) +{ + _mirror_in_sync = in_sync; +} + void init_cmd_name(int status) { _log_cmd_name = status; @@ -239,6 +245,11 @@ int security_level() return _security_level; } +int mirror_in_sync(void) +{ + return _mirror_in_sync; +} + void init_debug(int level) { _debug_level = level; diff --git a/lib/log/log.h b/lib/log/log.h index 7db9ea04..e8afd4d7 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -73,6 +73,7 @@ void init_indent(int indent); void init_ignorelockingfailure(int level); void init_lockingfailed(int level); void init_security_level(int level); +void init_mirror_in_sync(int in_sync); void set_cmd_name(const char *cmd_name); @@ -85,6 +86,7 @@ int debug_level(void); int ignorelockingfailure(void); int lockingfailed(void); int security_level(void); +int mirror_in_sync(void); /* Suppress messages to stdout/stderr (1) or everywhere (2) */ /* Returns previous setting */ |