| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
| |
Just small updates and remove <backtrace> after log_error.
|
|
|
|
| |
Adding (void) where we cannot really report an error.
|
|
|
|
|
| |
We cannot do anything better here anyway - we are already in logging function,
so just ignore this issue here - it will most likely stop application later.
|
|
|
|
|
| |
Since before 'goto done' is bufused zeroed, it would otherwise write 1
byte in front of buffer.
|
|
|
|
|
| |
Since last character needs to be \0 for string,
pass buffer size smaller by 1 byte.
|
|
|
|
|
| |
As the buf2[] and locn[] can't be used at the same time, safe 1 page from
stack memory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Today, we use "suppress_messages" flag (set internally in init_locking fn based
on 'ignorelockingfailure() && getenv("LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES")'.
This way, we can suppress high level messages like "File-based locking
initialisation failed" or "Internal cluster locking initialisation failed".
However, each locking has its own sequence of initialization steps and these
could log some errors as well. It's quite misleading for the user to see such
errors and warnings if the "--sysinit" is used (and so the ignorelockingfailure
&& LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable). Errors and
warnings from these intermediary steps should be suppressed as well if requested.
This patch propagates the "suppress_messages" flag deeper into locking init
functions. I've also added these flags for other locking types for consistency,
though it's not actually used for no_locking and readonly_locking.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Isn't usually perfomance critical - but log_error is used i.e.for debuging,
this code noticable slows down the processing.
Added 512KB limit to avoid memory exhastions in case of some endless loop.
TODO: use _lvm_errmsg buffer only when lvm2api needs it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New strategy for memory locking to decrease the number of call to
to un/lock memory when processing critical lvm functions.
Introducing functions for critical section.
Inside the critical section - memory is always locked.
When leaving the critical section, the memory stays locked
until memlock_unlock() is called - this happens with
sync_local_dev_names() and sync_dev_names() function call.
memlock_reset() is needed to reset locking numbers after fork
(polldaemon).
The patch itself is mostly rename:
memlock_inc -> critical_section_inc
memlock_dec -> critical_section_dec
memlock -> critical_section
Daemons (clmvd, dmevent) are using memlock_daemon_inc&dec
(mlockall()) thus they will never release or relock memory they've
already locked memory.
Macros sync_local_dev_names() and sync_dev_names() are functions.
It's better for debugging - and also we do not need to add memlock.h
to locking.h header (for memlock_unlock() prototyp).
|
|
|
|
|
| |
As bufused is assigned 0 in preceding source line
clang Idempotent operation
|
| |
|
| |
|
| |
|
|
|
|
| |
and warning mesages while --ignorelockingfailure is used.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
testsuite). (This is showing a problem in the pvmove test for me, so I expect
the tests to start failing -- this needs to be fixed separately though.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we are using errno values, we should use '0' as a default value
which indicates a non-error, rather than defining some made-up default
value that is not defined in errno. If we need to deviate from errno
values, this will most likely indicate a flaw in our design.
Add prototypes for lvm_errno and lvm_errmsg inside lvm.h and provide
a basic description of their function. This fixes a couple compile
warnings.
Author: Dave Wysochanski <dwysocha@redhat.com>
|
| |
|
|
|
|
|
| |
Change create_toolcontext to still return an object if it fails part-way.
Add EUNCLASSIFIED (-1) as the default LVM errno code.
|
|
|
|
|
| |
(Enabled by default while we test it, but in due course we'll only store
the error messages when we need to.)
|
|
|
|
|
| |
Change plog to use dm_log_with_errno unless deprecated dm_log_init was used.
Rename plog macro to LOG_LINE and use in dm_dump_memory_debug.
|
| |
|
| |
|
|
|
|
| |
is required in fewer circumstances. (mornfall)
|
|
|
|
|
|
| |
Related compiler warning:
log/log.c:242: warning: declaration of 'error_message_produced' shadows a global declaration
../include/log.h:98: warning: shadowed declaration is here
|
| |
|
| |
|
|
|
|
| |
Warn if command exits with non-zero status code without a prior log_error.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/misc/lvm-file.c (lvm_fclose): New function.
* lib/misc/lvm-file.h (lvm_fclose): Declare it.
* lib/config/config.c (write_config_file): Use the new function to detect
and diagnose unlikely write failure.
* lib/filters/filter-persistent.c (persistent_filter_dump): Likewise.
* lib/format_text/archive.c (archive_vg): Likewise.
* lib/format_text/format-text.c (_vg_write_file): Likewise.
* lib/log/log.c (fin_log): Similar, but use dm_fclose directly.
Include "\n" at end of each fprintf format string.
|
|
|
|
| |
continues to send messages to stdout.
|
|
|
|
|
|
| |
Free a temporary dir string in fcntl_lock_file() after use.
Fix a dm_pool_destroy() in matcher_create().
Introduce goto_bad macro.
|
| |
|
|
|
|
| |
Fix exit statuses of reporting tools (2.02.19).
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
event-driven model. Without changes to the way the cache gets updated, the
option is currently unreliable without a global lock to prevent any lvm2
commands from running concurrently.
|
|
|
|
|
| |
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
|
|
|
|
|
| |
Use set_lv() and dev_set() to wipe sections of devices.
Add mirror_in_sync() flag to avoid unnecessary resync on activation.
|