| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Report any problem of fcntl.
|
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
| |
Release allocated hash before exit.
|
|
|
|
|
| |
Simplifies the code, properly detects too long socket paths,
drops unused parameter.
|
|
|
|
|
|
| |
Support lock conversion
Work also with LCK_READ
TODO: do more validation.
|
| |
|
| |
|
| |
|
|
|
|
| |
(Test commit.)
|
|
|
|
| |
(test commit)
|
| |
|
| |
|
|
|
|
| |
Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
|
|
|
|
| |
Adding (void) where we cannot really report an error.
|
|
|
|
| |
return ENOMEM when malloc fails.
|
|
|
|
|
|
| |
Drop whole buffer clearing (most messages at <100 bytes).
Just make sure we have always \0 terminated string for strlen() operations.
(before for PIPE_BUF sized messages this was not set).
|
|
|
|
| |
(fix previous commit)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This could be seen as some sort of simple validation - it's not easy to
recognize a valid message for now - but we definitely do not want to
allocate a lot of megabytes in clvmd memory locked daemon when broken
message gets in.
Size of 8000 is just selected for now - possibly there could be much
lower value put in.
|
|
|
|
|
| |
Use struct initalizers to fill struct members and at the same time have
all unspecified members set to 0.
|
| |
|
|
|
|
|
| |
Since it on exit path, it's not a big difference,
but makes less noise in analyzer and valgrind.
|
|
|
|
| |
Use just buffer size limit (it's used for debug only)
|
|
|
|
| |
Make it obvious to analyzer - we can't do anything better here anyway.
|
| |
|
|
|
|
| |
Make sure parsed string fits given char buffer.
|
|
|
|
| |
Move declaration to the front of function to follow coding rules.
|
|
|
|
| |
Just a minor readability conversion.
|
| |
|
|
|
|
|
| |
This has disabled clvmd for being executed.
(FIXME improve testing part to catch this fault)
|
|
|
|
| |
Minor leak on command initialization.
|
|
|
|
|
| |
Static analyzer noticed this vars are used even when error is reported
back thus their state is undefined - set to 0 for this case.
|
|
|
|
| |
in fail path initialize to 0.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch to the suspend code - like the similar change for resume -
queries the lock mode of a cluster volume and records whether it is active
exclusively. This is necessary for suspend due to the possibility of
preloading targets. Failure to check to exclusivity causes the cluster target
of an exclusively activated mirror to be used when converting - rather than
the single machine target.
|
| |
|
|
|
|
| |
Drop unused LCK_LOCAL from debug msg.
|
|
|
|
| |
actions caused clvmd to turn off monitoring of the volume causing the action.
|
|
|
|
|
|
|
|
| |
that we can also test clustered volume groups (vgcreate -c y) in the test
suite. Unfortunately we can't make this the testing default since cluster
mirrors require further infrastructure, and snapshots probably don't work at
all. I'll eventually add a few test cases that create clustered VGs
specifically.
|
| |
|
|
|
|
|
|
| |
Code here is using thread write protected variable without locking.
So add locking, for proper synchronization and a FIXME, since the
code needs closer look.
|
|
|
|
|
| |
Do not reacquire mutex several times without a real reason.
Code readability is also better.
|
|
|
|
|
|
| |
Barrier is supposed to be used in situation like this
and replace tricky mutex usage, where mutex has been unlocked
by a different thread than the locking thread.
|
|
|
|
|
|
| |
Usage of thread unprotected init_test is not correct and needs probably lvm lock
since it part of lvm library. Current implementation may probably fail with
test mode and actually create something unexpectedly (and vice versa).
|
|
|
|
|
|
|
|
|
|
| |
Since default thread stack size is around 8MB and clvmd creates for now thread
for message, clvmd may easily reach multi GB size of in-memory locked pages
(runs with mlockall()).
This patch significantly reduces memory usage to just tens of MB,
and now different reasons are the cause of server overloading.
Now we are running out of free file descriptors mostly.
|
|
|
|
|
|
|
|
|
|
|
| |
Replace usleep with pthread condition to increase speed testing
(for simplicity just 1 condition for all locks).
Use thread mutex also for unlock resource (so it wakes up awaiting
threads)
Better check some error states and return error in fail case with
unlocked mutex.
|
| |
|
|
|
|
| |
(One further fix needed to remove the stray pvmove LVs left behind.)
|
|
|
|
|
|
|
|
|
|
| |
Since execve passed only NULL as environ, we had lost all environment vars on
restart - thus actually running 'different' clvmd then the one at start.
Preserving environ allows to restart clvmd with the same settings
(i.e. LD_LIBRARY_PATH)
Add test for second restart.
|
|
|
|
|
|
|
|
| |
Add named cluster_ops to easily learn the name of the active cluster manager,
so we are able to restart singlenode manager in testing.
Add simple test for clvmd -S (restart) and -R (refresh)
(though it needs some extensions).
|