| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
|
|
|
|
|
|
|
| |
- logging is not controlled by "levels" but by "types"; types are
independent of each other... implementation of the usual "log level"
user-level semantics can be simply done on top; the immediate
application is enabling/disabling wire traffic logging independently
of other debug data, since the former is rather bulky and can easily
obscure almost everything else
- all logs go to "outlets", of which we currently have 2: syslog and
stderr; which "types" go to which "outlets" is entirely configurable
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were several hard-coded values for run directory around the code.
Also, some tools are DM specific only, others are LVM specific and there
was no distinction made here before. With this patch applied, we have
this cleaned up a bit (subsystem in brackets, defaults in parentheses):
[common] configurable PID_DIR (/var/run)
lvm [lvm] configurable RUN_DIR (/var/run/lvm)
configurable locking dir (/var/lock/lvm)
clvmd [lvm] configurable pid file (PID_DIR/clvmd.pid)
socket (RUN_DIR/clvmd.sock)
lvmetad [lvm] configurable pid file (PID_DIR/lvmetad.pid)
socket (RUN_DIR/lvmetad.socket)
dm [dm] configurable DM_RUN_DIR (/var/run)
cmirrord [dm] configurable pid file (PID_DIR/cmirrord.pid)
dmeventd [dm] configurable pid file (PID_DIR/dmeventd.pid)
server fifo (DM_RUN_DIR/dmeventd-server)
client fifo (DM_RUN_DIR/dmeventd-client)
The changes briefly:
- added configure --with-default-pid-dir
- added configure --with-default-dm-run-dir
- added configure --with-lvmetad-pidfile
- by default, using one common pid directory for everything
(only lvmetad was not following this before)
|
|
|
|
| |
There is missing some proper reaction when update fails ?
|
|
|
|
| |
also in error path
|
|
|
|
|
|
|
| |
Add 3rd daemon return state "unknown" for lookups that are carried out
successfully but don't find the item requested.
Avoid issuing error messages when it's expected that a device that's
being looked up in lvmetad might not be there.
|
|
|
|
|
|
| |
Test pointers from allocation against NULL.
Error paths should be checked, some of them probably need
some extesions.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
so there is no mem leak on this error path.
Also actually check if the hash exists.
|
| |
|
| |
|
|
|
|
|
| |
- some client-side memory leak fixes
- announce and check protocols and protocol versions
|
|
|
|
|
|
|
| |
cleanup gcc warning,
use PRIu64
header cleanups
const pointer fixes.
|
|
|
|
| |
lvm.conf *and* lvmetad is running.
|
| |
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
& vgsplit do this).
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
Remove also unreachable break..
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used to be a few mis-ordered memory accesses (release and access in the next
block). Fix that set_flag could have sometimes corrupted the flags being
modified.
A few issues with metadata tracking are sorted out as well now, and there are
only a few problems remaining before we can integrate lvmetad, mostly on the
client side:
- metadata areas need to be tracked in lvmetad (most likely to be addressed
through an extension of metadata, meaning no special support in lvmetad would
be needed)
- non-udev scanning code needs to be taught about telling lvmetad about device
disappearance (pvscan most importantly)
- this last item also needs to mesh with metadata inconsistencies and
suddenly-incomplete volume groups (aux disable_dev in tests); udev-based
scanning should address this separately and more elegantly
|
| |
|
| |
|
|
|
|
| |
Shown by clang analyzer.
|
|
|
|
|
|
|
|
|
| |
Next iteration for better fit of lvmetad compilation.
Move build of libdaemon.a into common subdir Makefile.
libdaemon.a is device-mapper target.
Build and install lvmetad as lvm2 target.
|
|
|
|
|
| |
It seem lvmetad deps must be expressed after the include.
Also adding lvmetad deps to device-mapper target in daemons dir.
|
|
|
|
| |
Should now be giving better build order and install lvmetad.
|
|
|
|
| |
and put _XOPEN_SOURCE so pthread_mutexattr is properly defined.
|
|
|
|
| |
Reflecting change in dm_config_value float r -> float f.
|
|
|
|
|
| |
dm_config_find_node to give non-const node pointer, since that better reflects
the contract of that function).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
daemon/common code in a single libdaemon.a, which is completely private. This
is currently linked into the lvmetad binary, and will be linked into LVM (the
client part, since static linking only picks up only symbols that are actually
used). I have also added --enable/disable-lvmetad to ./configure; although the
current default is off, I expect this to be flipped to on shortly. There's no
LVM-side support yet, but when there is, even when built, it'll still need to
be enabled by an lvm.conf option.
|
| |
|
|
|
|
|
| |
metadata, which is then serialised and discarded. This fixes a couple of
outstanding TODO items about handling the MISSING flags correctly.
|
|
|
|
|
| |
equality implies metadata equality. Signal error in response to any update
requests that try to overwrite metadata without providing a higher seqno.
|
| |
|
|
|
|
|
| |
update_pv_status, saving a dozen lines of code and execution time of one
walkthrough of the PV list.
|
| |
|
| |
|
|
|
|
|
|
|
| |
very reasonable amount of parallel access, although the hash tables may become
a point of contention under heavy loads. Nevertheless, there should be orders
of magnitude less contention on the hash table locks than we currently have on
block device scanning.
|
| |
|
| |
|
| |
|
|
|
|
| |
memory leak) => remove it (it's been unused anyway).
|