summaryrefslogtreecommitdiffstats
path: root/daemons/clvmd
Commit message (Collapse)AuthorAgeFilesLines
* clvmd,lvmetad: check for fcntl resultZdenek Kabelac2012-08-231-1/+2
| | | | Report any problem of fcntl.
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-231-3/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* clvmd: release excl_uuid hashZdenek Kabelac2012-08-231-1/+2
| | | | Release allocated hash before exit.
* cleanup: replace memset with struct initilizationZdenek Kabelac2012-06-224-24/+30
| | | | | Simplifies the code, properly detects too long socket paths, drops unused parameter.
* Update singlenode lockingZdenek Kabelac2012-04-241-64/+59
| | | | | | Support lock conversion Work also with LCK_READ TODO: do more validation.
* Avoid closing clvmd socket twice.Milan Broz2012-03-271-0/+2
|
* Return mem fail if hash insert failsZdenek Kabelac2012-03-231-1/+2
|
* Make sure namelen fits into buffer allocated on stackZdenek Kabelac2012-03-231-0/+3
|
* Remove some whitespaces.Milan Broz2012-03-101-6/+6
| | | | (Test commit.)
* Remove some whitespaces.Milan Broz2012-03-101-1/+1
| | | | (test commit)
* Add traceback for failpathZdenek Kabelac2012-03-011-1/+1
|
* Debug log for hold_lock failureZdenek Kabelac2012-03-011-1/+2
|
* Correct enum typeZdenek Kabelac2012-03-012-4/+4
| | | | Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
* Few more close and dev_close traceZdenek Kabelac2012-03-011-7/+9
| | | | Adding (void) where we cannot really report an error.
* Check for allocation errorZdenek Kabelac2012-03-011-4/+13
| | | | return ENOMEM when malloc fails.
* Ensure clvmd message is always \0 terminatedZdenek Kabelac2012-02-281-3/+3
| | | | | | 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).
* Missed to properly merge patch for definition of MAX_MISSING_LENZdenek Kabelac2012-02-281-1/+1
| | | | (fix previous commit)
* Add log_sys_error for closeZdenek Kabelac2012-02-281-2/+3
|
* Limit max size of clvmd messageZdenek Kabelac2012-02-281-1/+3
| | | | | | | | | | 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.
* Do not send uninitilised bytesZdenek Kabelac2012-02-281-31/+27
| | | | | Use struct initalizers to fill struct members and at the same time have all unspecified members set to 0.
* Add some log_sys_errors to close() callZdenek Kabelac2012-02-271-1/+2
|
* Nicer cleanup of excl_uuid hashZdenek Kabelac2012-02-271-3/+7
| | | | | Since it on exit path, it's not a big difference, but makes less noise in analyzer and valgrind.
* A bit more safe version of sprintfZdenek Kabelac2012-02-271-1/+1
| | | | Use just buffer size limit (it's used for debug only)
* Explicitely ignore result from sync_unlock()Zdenek Kabelac2012-02-271-1/+1
| | | | Make it obvious to analyzer - we can't do anything better here anyway.
* Drop uname call, it's not used from gulm era.Zdenek Kabelac2012-02-271-2/+0
|
* Limit sscanf params with sizeZdenek Kabelac2012-02-231-2/+2
| | | | Make sure parsed string fits given char buffer.
* Remaing code sufflingZdenek Kabelac2012-02-231-8/+10
| | | | Move declaration to the front of function to follow coding rules.
* A bit more readable codeZdenek Kabelac2012-02-081-16/+9
| | | | Just a minor readability conversion.
* Automatically detect whether corosync clvmd needs to use confdb or cmap. (fabio)Alasdair Kergon2012-01-312-4/+64
|
* Oops missed braces in previous commitZdenek Kabelac2012-01-261-1/+2
| | | | | This has disabled clvmd for being executed. (FIXME improve testing part to catch this fault)
* Fix leak of hash tableZdenek Kabelac2012-01-251-0/+1
| | | | Minor leak on command initialization.
* Set to a defined value vars used after error pathZdenek Kabelac2012-01-251-1/+1
| | | | | Static analyzer noticed this vars are used even when error is reported back thus their state is undefined - set to 0 for this case.
* Test for uname resultZdenek Kabelac2012-01-251-1/+3
| | | | in fail path initialize to 0.
* Add CLVMD_FLAG_REMOTE to skip processing on local node.Alasdair Kergon2012-01-213-26/+41
|
* Preserve exclusive activation of cluster mirror when converting.Jonathan Earl Brassow2012-01-201-1/+5
| | | | | | | | | 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.
* Only use built-in stack size in clvmd - ignore lvm.conf.Alasdair Kergon2011-12-081-1/+1
|
* Test for LCK_CLUSTER_VG directly in args[0].Alasdair Kergon2011-12-082-20/+19
| | | | Drop unused LCK_LOCAL from debug msg.
* Fix clvmd to respect DMEVENTD_MONITOR_IGNORE. Fixes a bug where dmeventdPetr Rockai2011-11-301-6/+11
| | | | actions caused clvmd to turn off monitoring of the volume causing the action.
* Correctly handle concurrent read (CR) locks in singlenode clvmd. This meansPetr Rockai2011-11-071-0/+13
| | | | | | | | 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.
* Remove unused variablesZdenek Kabelac2011-10-111-1/+0
|
* Add some fixme lockingZdenek Kabelac2011-10-111-0/+4
| | | | | | 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.
* Simplify worker loopZdenek Kabelac2011-10-111-11/+10
| | | | | Do not reacquire mutex several times without a real reason. Code readability is also better.
* Use barrier instead of mutexZdenek Kabelac2011-10-111-9/+7
| | | | | | 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.
* Add FIXMEs for init_testZdenek Kabelac2011-10-111-3/+5
| | | | | | 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).
* Limit thread stackZdenek Kabelac2011-10-111-4/+12
| | | | | | | | | | 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.
* Use condition instead of sleepZdenek Kabelac2011-10-111-22/+35
| | | | | | | | | | | 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.
* Typo in debug messageZdenek Kabelac2011-09-291-1/+1
|
* Introduce revert_lv for better pvmove cleanup.Alasdair Kergon2011-09-271-2/+3
| | | | (One further fix needed to remove the stray pvmove LVs left behind.)
* Use execvp for clvmd restartZdenek Kabelac2011-09-261-1/+1
| | | | | | | | | | 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.
* Restart CLVMD with same cluster managerZdenek Kabelac2011-09-256-7/+10
| | | | | | | | 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).