summaryrefslogtreecommitdiffstats
path: root/daemons
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for systemd socket handover for common daemon-server code and ↵Peter Rajnoha2012-02-281-19/+138
| | | | | | | also add support for new OOM killer adjustment interface. This code is already a part of dmeventd, but it's modified slightly to check sockets instead of FIFOs.
* 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).
* Better detection of missing dmeventd fifo connectionZdenek Kabelac2012-02-281-6/+2
|
* 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-282-18/+19
|
* 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.
* Do not hide deallocation of bufferZdenek Kabelac2012-02-271-2/+2
| | | | | | | | As API is passing structures by value, do not leave the function which created buffer and keeps valid pointer look like it would be some memory leak and move free of buffer from inner function - makes more obvious, how is the memory management handled.
* Add FIXME for misuse in case of dm_event_mask enum.Zdenek Kabelac2012-02-272-0/+4
| | | | Using enum for bitmask is not proper solution here.
* 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.
* Systemd is linux-specific - move the supporting code under the 'ifdef linux'.Peter Rajnoha2012-02-271-70/+74
| | | | | Some 'defines' used in this specific code were already under an ifdef so this patch just completes it.
* Add assert for oldnameZdenek Kabelac2012-02-271-0/+1
| | | | | | | Code cannot proceed if oldname would be NULL. Since lvmetad currently doesn't use logging mechanism of lvm to report internal errors - stay with current code style of lvmetad which uses plain asserts for cases like this.
* A bit more safe version of sprintfZdenek Kabelac2012-02-271-1/+1
| | | | Use just buffer size limit (it's used for debug only)
* Move allocation after check for vgidZdenek Kabelac2012-02-271-1/+4
| | | | | so there is no mem leak on this error path. Also actually check if the hash exists.
* 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
|
* Improve error handling & reporting in common daemon code.Petr Rockai2012-02-263-12/+15
|
* Fix server-side leaks in lvmetad.Petr Rockai2012-02-241-2/+8
|
* Clean up the lvmetad state more thoroughly upon shutdown.Petr Rockai2012-02-241-0/+8
|
* Fix an error path in daemon_open.Petr Rockai2012-02-241-1/+2
|
* Couple of improvements in the daemon (common + lvmetad) code:Petr Rockai2012-02-236-4/+56
| | | | | - some client-side memory leak fixes - announce and check protocols and protocol versions
* 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.
* Some reformating for lvmetad uddatesZdenek Kabelac2012-02-232-51/+58
| | | | | | | cleanup gcc warning, use PRIu64 header cleanups const pointer fixes.
* Add a missed dependency that is required to pull in dameons/common in an earlyPetr Rockai2012-02-231-0/+1
| | | | part of the build.
* We need daemons/common now even if the lvmetad server side is not built.Petr Rockai2012-02-231-1/+3
|
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-234-5/+4
| | | | lvm.conf *and* lvmetad is running.
* Also use DEFAULT_RUN_DIR for the lvmetad socket on the client side.Petr Rockai2012-02-231-1/+1
|
* Tweak lvmetad a bit more:Petr Rockai2012-02-211-17/+40
| | | | | | - allow at most one PV on any given device - allow PV lookup by device - merge the pvmeta info into VG metadata when responding to vg_lookup
* Drop the now-redundant pvid_to_status hash.Petr Rockai2012-02-151-35/+27
|
* Update lvmetad: use device major/minor pair to track devices. Keep a pvmetaPetr Rockai2012-02-151-79/+118
| | | | | | config tree per PV which is mostly provided by the client, so it can be used to keep track of things like label_sector, PV format, mda count / offsets and so on.
* (lvmetad) Remove unused variable.Petr Rockai2012-02-151-1/+1
|
* In lvmetad, also nuke VGs when all their PVs are stolen by another VG (vgmergePetr Rockai2012-02-151-8/+28
| | | | & vgsplit do this).
* Detect failing fifoZdenek Kabelac2012-02-151-0/+8
| | | | | If the fifo died because of dmeventd restart - do not wait for 20s in select - it will not get better and return error immediately.
* lvmetad server-side update:Petr Rockai2012-02-151-108/+410
| | | | | | | | - rename the hashes to be explicit about the mapping - add VG/PV listing calls to the protocol - cache slightly more of the per-PV state - filter cached metadata - compare the metadata upon metadata_update
* Do not forget to initialise the error value in daemon_reply.Petr Rockai2012-02-151-1/+1
|
* Add some FIXME around allocation codeZdenek Kabelac2012-02-131-8/+15
| | | | Remove also unreachable break..
* Make sure dereferenced words[0] and words[1] are definedZdenek Kabelac2012-02-131-1/+2
|
* Check for missing reply_uuidZdenek Kabelac2012-02-131-0/+4
|
* Check for allocation failureZdenek Kabelac2012-02-131-2/+9
|
* Fix message checkZdenek Kabelac2012-02-101-3/+3
| | | | | Check pointer from strchr for NULL instead of crash later. Badly formated message would have crash dmeventd otherwise.
* Remove unreachable codeZdenek Kabelac2012-02-101-1/+0
|
* A bit more readable codeZdenek Kabelac2012-02-081-16/+9
| | | | Just a minor readability conversion.
* Remove unneeded assignmentsZdenek Kabelac2012-02-082-4/+2
| | | | Variables have (or will have) those values set.
* Keep page_size as signed numberZdenek Kabelac2012-02-081-1/+1
| | | | Since it's return value from sysconf and is checked for <0.
* Add boundary test for number of mirror devs and logsZdenek Kabelac2012-02-081-2/+5
| | | | | | | As atoi may return negative value - test for both limits. Test log_args for limits before calling alloca(). Code from dmeventd mirror plugin should probably share same code as we have in mirrored.c.
* Remove a dubious log message ("another thread is handling an event") from LVMPetr Rockai2012-02-011-4/+1
| | | | dmeventd plugins. Fixes RHBZ 771419.
* 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)