1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-25 10:04:17 +03:00

608 Commits

Author SHA1 Message Date
Zdenek Kabelac
c5120c1a7a Log unlink() error 2011-09-06 18:11:21 +00:00
Zdenek Kabelac
0b13efd7e5 Hack for build rules of lvmetad
FIXME
2011-09-02 14:49:00 +00:00
Zdenek Kabelac
ccc01ce94b Compile fix
Reflecting change in dm_config_value  float r -> float f.
2011-09-02 11:04:12 +00:00
Alasdair Kergon
6f6b2cdc52 Only build libdaemon.a when we need it at the moment. 2011-09-01 17:56:53 +00:00
Zdenek Kabelac
997dabdb9e Keep the old-style prototypes 2011-09-01 13:25:50 +00:00
Petr Rockai
dbe351860e Fix warnings and constness handling in lvmetad-core (adjusting the
dm_config_find_node to give non-const node pointer, since that better reflects
the contract of that function).
2011-08-31 12:39:58 +00:00
Petr Rockai
178675bec5 Fix warnings in daemons/common. 2011-08-31 12:18:40 +00:00
Petr Rockai
2254b74598 Get rid of the old lvmetad Makefile. 2011-08-31 11:44:27 +00:00
Petr Rockai
c4d973530f A compromise integration of LVMetaD into the build: I have kept all the
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.
2011-08-31 11:31:57 +00:00
Zdenek Kabelac
0b97ce28d6 Fix resource leak when strdup fails
Static analyzer noticed, strdup failing path leaks dmt structure.
2011-08-31 08:23:05 +00:00
Petr Rockai
51e1300519 Adapt LVMetaD to use the new dm_config interfaces. 2011-08-30 15:44:01 +00:00
Petr Rockai
5c43b9bda7 Adapt the daemon/common code to use the new dm_config interface. 2011-08-30 15:42:56 +00:00
Alasdair Kergon
2955689c71 more pre-release fixes 2011-08-12 02:16:46 +00:00
Alasdair Kergon
a35e96114f Drop CCS* variables no longer used. 2011-08-12 01:52:16 +00:00
Alasdair Kergon
9a9dde2d8c pre-release fixes incl make distclean and configure --with-raid=none/shared 2011-08-11 19:18:17 +00:00
Milan Broz
48aa36a654 Never ever use uninitialised descriptors if pipe() fails
(because of maximum open count fd exceeded or so).

Better return busy message, so even clients fail in more controlled way.

Without patch,  clvmd crashes with various strange backtraces
if under heavy load of connection requests.

https://bugzilla.redhat.com/show_bug.cgi?id=698393
https://bugzilla.redhat.com/show_bug.cgi?id=697945

(It still can OOM but that's different issue.)
2011-08-11 12:57:10 +00:00
Jonathan Earl Brassow
9c3fd6948b Add dmeventd monitoring for RAID devices. 2011-08-11 05:00:20 +00:00
Zdenek Kabelac
e9bfcd0df0 Replace free_vg with release_vg
Move the free_vg() to  vg.c  and replace free_vg  with release_vg
and make the _free_vg internal.

Patch is needed for sharing VG in vginfo cache so the release_vg function name
is a better fit here.
2011-08-10 20:25:29 +00:00
Milan Broz
6447934cff Initialise clvmd locks before lvm context to avoid open descriptor leaks.
(At least /dev/mapper/control is open after lvm context init.)
2011-08-10 11:00:32 +00:00
Milan Broz
0deb49e2b6 Remove obsoleted GULM clvmd cluster locking support. 2011-08-09 18:11:00 +00:00
Zdenek Kabelac
65073ca838 Add test for fcntl error in singlenode client code.
Static analyzer noticed this check could be handy.
2011-08-04 12:13:50 +00:00
Peter Rajnoha
b4c05c8519 Add support for systemd file descriptor handover in dmeventd.
Systemd preloads file descriptors for us and passes them in for
newly spawned daemon when using on-demand fifo (or socket)
based activation.

This patch adds checks for file descriptors preloaded by
systemd and uses them instead of opening the FIFOs again
to properly support on-demand FIFO-based activation.

(We'll change FIFOs to sockets soon - but still this
part of the code will stay almost the same.)
2011-07-28 13:06:50 +00:00
Peter Rajnoha
9482fdae35 Add support for new oom killer adjustment interface (oom_score_adj).
The filename to adjust the oom score was changed in 2.6.36.
We should use oom_score_adj instead of oom_adj (which is still
there under /proc, but it's scheduled for removal in August 2012).

New oom_score_adj uses a range from -1000 (OOM_SCORE_ADJ_MIN,
disable oom killing) to 1000 (OOM_SCORE_ADJ_MAX).
2011-07-28 13:03:37 +00:00
Petr Rockai
4b20b480b1 lvmetad: Edit the MISSING_PV flags only after making a "reply" copy of the
metadata, which is then serialised and discarded. This fixes a couple of
outstanding TODO items about handling the MISSING flags correctly.
2011-07-25 17:59:50 +00:00
Petr Rockai
0574adcaa1 lvmetad: Check integrity of multiple metadata copies, i.e. ensure that seqno
equality implies metadata equality. Signal error in response to any update
requests that try to overwrite metadata without providing a higher seqno.
2011-07-25 15:51:51 +00:00
Petr Rockai
c33c147c9b lvmetad: A couple of TODOs, and fix a few trivial memory leaks. 2011-07-25 15:33:04 +00:00
Petr Rockai
3082fa5d4c lvmetad: Obliterate vg_status by returning the same information from
update_pv_status, saving a dozen lines of code and execution time of one
walkthrough of the PV list.
2011-07-20 21:33:41 +00:00
Petr Rockai
7d6fed35c0 lvmetad: Fix a possible infinite loop in vg_status. 2011-07-20 21:27:28 +00:00
Petr Rockai
81535db537 lvmetad: Robustify update_pv_status and remove an useless lookup. 2011-07-20 21:26:18 +00:00
Petr Rockai
b33c9d313f First stab at making lvmetad-core threadsafe. The current design should allow
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.
2011-07-20 21:23:43 +00:00
Petr Rockai
503190e499 lvmetad: Avoid stale PV -> VG mappings on metadata update. 2011-07-20 18:45:32 +00:00
Petr Rockai
fdbde27ed9 Optimise PV -> VG lookups by using a UUID (hash) map. 2011-07-20 18:34:57 +00:00
Petr Rockai
54350d68ce Free up allocated memory before exiting, in lvmetad. 2011-07-20 18:24:49 +00:00
Petr Rockai
f342b6a862 Fix two small (but eventually unbounded) leaks in daemon-server.c. 2011-07-20 18:23:33 +00:00
Petr Rockai
28b6842556 Can't have a global memory pool in lvmetad (that would constitute an ongoing
memory leak) => remove it (it's been unused anyway).
2011-07-20 16:49:21 +00:00
Petr Rockai
ecb4ee0b5a Make lvmetad also report VGID in reply when adding a PV without MDAs (this
obviously only works for VGs that already had at least some MDA discovered).
2011-07-20 16:46:40 +00:00
Petr Rockai
05e87b6b65 Add code to lvmetad's testclient that scans an actual physical device,
effectively emulating a future "pvscan --lvmetad" command.
2011-07-20 15:15:41 +00:00
Petr Rockai
9f228ea974 Make lvmetad report the VG ID and status (complete, partial) in reply to pv_add
requests.
2011-07-20 15:14:17 +00:00
Petr Rockai
e36cd89437 Towards MISSING (PV) flag management in lvmetad. 2011-07-19 19:15:22 +00:00
Petr Rockai
df4758d73b Work out some more details in metadata update in lvmetad. 2011-07-19 16:48:13 +00:00
Petr Rockai
8e5d1c93eb More work on cache maintenance code in lvmetad: keep track of PV status. 2011-07-19 14:13:59 +00:00
Petr Rockai
f20e649ad1 Start filling in the core LVMetaD functionality and the corresponding
testclient bits.
2011-07-18 14:48:30 +00:00
Petr Rockai
8e72b3d6d6 Various improvements to the daemon-common code, including automated response
formatting from config trees provided by the daemon implementation.
2011-07-18 14:46:54 +00:00
Petr Rockai
8970d1b895 Improve format_buffer in daemon-shared.c, adding block formatting in addition
to string/integer (this propagates to the *simple* family of request/response
functionality).
2011-07-18 14:42:44 +00:00
Alasdair Kergon
7a16e1f399 move doc to doc dir 2011-07-08 18:55:28 +00:00
Alasdair Kergon
225d1df8a7 report which dev was not found 2011-07-08 12:35:48 +00:00
Petr Rockai
0952bf42a8 Differentiate the request and response format, in daemon/common. 2011-06-29 22:20:14 +00:00
Zdenek Kabelac
daf9efb723 Annotate CLVMD_CMD_SYNC_NAMES in decode_cmd 2011-06-28 13:42:15 +00:00
Petr Rockai
1a3dab6075 Add int/str lookup routines specific to the reply (in client) and request (in
server) for nicer-looking code (thin wrapping around find_config_{int,str}).
2011-06-27 14:03:58 +00:00
Petr Rockai
e828044efd Also parse the config_tree on the client end (daemon-client.c). 2011-06-27 13:58:11 +00:00