Petr Rockai
9474992482
lvmetad: A couple of TODOs, and fix a few trivial memory leaks.
2011-07-25 15:33:04 +00:00
Petr Rockai
c2ca1a707a
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
bc0a902434
lvmetad: Fix a possible infinite loop in vg_status.
2011-07-20 21:27:28 +00:00
Petr Rockai
fba6c62b84
lvmetad: Robustify update_pv_status and remove an useless lookup.
2011-07-20 21:26:18 +00:00
Petr Rockai
0cfb99d385
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
dcbf5a3b5d
lvmetad: Avoid stale PV -> VG mappings on metadata update.
2011-07-20 18:45:32 +00:00
Petr Rockai
cd7bca83e1
Optimise PV -> VG lookups by using a UUID (hash) map.
2011-07-20 18:34:57 +00:00
Petr Rockai
652e0757c9
Free up allocated memory before exiting, in lvmetad.
2011-07-20 18:24:49 +00:00
Petr Rockai
a720420466
Fix two small (but eventually unbounded) leaks in daemon-server.c.
2011-07-20 18:23:33 +00:00
Petr Rockai
42e23dbf6c
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
50ff3c076e
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
4eb53158e5
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
c33d33bab7
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
2ef620ec7f
Towards MISSING (PV) flag management in lvmetad.
2011-07-19 19:15:22 +00:00
Petr Rockai
3c238baf03
Work out some more details in metadata update in lvmetad.
2011-07-19 16:48:13 +00:00
Petr Rockai
9796bd4db6
More work on cache maintenance code in lvmetad: keep track of PV status.
2011-07-19 14:13:59 +00:00
Petr Rockai
252853560c
Start filling in the core LVMetaD functionality and the corresponding
...
testclient bits.
2011-07-18 14:48:30 +00:00
Petr Rockai
372e9b3d64
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
aac236f4a8
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
730cfc74b8
move doc to doc dir
2011-07-08 18:55:28 +00:00
Alasdair Kergon
c837830f6a
report which dev was not found
2011-07-08 12:35:48 +00:00
Petr Rockai
14e012871f
Differentiate the request and response format, in daemon/common.
2011-06-29 22:20:14 +00:00
Zdenek Kabelac
88fca3eff4
Annotate CLVMD_CMD_SYNC_NAMES in decode_cmd
2011-06-28 13:42:15 +00:00
Petr Rockai
94bb67ab37
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
aaca7f111f
Also parse the config_tree on the client end (daemon-client.c).
2011-06-27 13:58:11 +00:00
Petr Rockai
55e300716f
Parse the incoming config tree in daemon-server.c, providing the
...
daemon-specific handler with a struct config_tree pointer to look things up in.
2011-06-27 13:46:45 +00:00
Petr Rockai
9925977b07
LVMetaD build hack: link to lvm-internal &c. and add a simple test script.
2011-06-27 13:44:33 +00:00
Petr Rockai
4fcbeed6ef
Implement daemon_send_simple and use it in the testclient.
2011-06-27 13:15:49 +00:00
Petr Rockai
308963261c
Do not open the socket with SOCK_NONBLOCK in daemon-client, since we have no
...
use for that behaviour (at least for now).
2011-06-27 13:14:53 +00:00
Petr Rockai
ea32ca07e7
Call daemon_close before exit in the testclient.
2011-06-27 12:27:34 +00:00
Petr Rockai
5c1706e3ef
Sketch out the actual on-wire format in daemon-client.h documentation, and add
...
a simplified send interface.
2011-06-27 12:26:54 +00:00
Petr Rockai
acf3616b3a
Add a skeleton for lvmetad, a test client, and a temporary Makefile to build
...
them. These are currently mostly for testing the daemon-common code. LVMetaD
functionality is expected to trickle in soon though.
2011-06-14 02:36:38 +00:00
Petr Rockai
92658f5661
Common daemon code: Implement basic socket-based communication infrastructure
...
(both client and server side). The server handles each connection in a separate
thread.
2011-06-14 02:34:18 +00:00
Alasdair Kergon
df390f1799
Major pvmove fix to issue ioctls in the correct order when multiple LVs
...
are affected by the move. (Currently it's possible for I/O to become
trapped between suspended devices amongst other problems.
The current fix was selected so as to minimise the testing surface. I
hope eventually to replace it with a cleaner one that extends the
deptree code.
Some lvconvert scenarios still suffer from related problems.
2011-06-11 00:03:06 +00:00
Peter Rajnoha
554923e0ae
Fix a few compile warnings.
...
clvmd-command.c:84:2: warning: implicit declaration of function ‘init_test’
lvm-functions.c:141:3: warning: too many arguments for format
2011-06-03 09:05:30 +00:00
Milan Broz
7c1a2417f5
Use /var/run/lvm for lvmetad socket.
2011-06-02 08:58:05 +00:00
Alasdair Kergon
0ebd0960b4
Propagate test mode to clvmd to skip activation and changes to held locks.
2011-06-01 21:16:55 +00:00
Petr Rockai
ba7d33be9c
Mention code layout in lvmetad DESIGN.
2011-05-23 14:46:48 +00:00
Petr Rockai
dc85d3fb57
More work on the common daemon framework. Make things compile, too.
2011-05-15 11:02:29 +00:00
Petr Rockai
73ffd6e748
More scavenging of common daemon code, this time the clvmd local socket setup
...
sequence.
2011-05-13 09:34:12 +00:00
Petr Rockai
d7448a721b
Start filling in some of the common daemon (server-side) functionality, taking
...
dmeventd code as a starting point.
2011-05-13 08:45:46 +00:00
Petr Rockai
04507b0ace
First go at the lvmetad client-side interface.
2011-05-13 08:17:26 +00:00
Petr Rockai
56517bad21
First stab at the prototypes of the daemon-common functionality (to be
...
eventually shared by dmeventd, lvmetad and clvmd).
2011-05-13 08:07:28 +00:00
Petr Rockai
f03e3ac15b
Initial design document for LVMetaD, building on the draft from June of last
...
year, incorporating the outcomes of today's and yesterday's discussions.
2011-05-12 17:49:46 +00:00
Petr Rockai
eee66d2a80
When glibc needs buffers for line buffering of input and output buffers, it
...
allocates these buffers in such way it adds memory page for each such buffer
and size of unlock memory check will mismatch by 1 or 2 pages.
This happens when we print or read lines without '\n' so these buffers are
used. To avoid this extra allocation, use setvbuf to set these bufffers ahead.
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Milan Broz <mbroz@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2011-05-07 13:50:11 +00:00
Zdenek Kabelac
a1eba521e3
Fix some unmatching sign comparation gcc warnings
...
Simple replacement for unsigned type - usually in for() loops.
2011-04-08 14:40:18 +00:00
Zdenek Kabelac
6b7fe2852a
Use dm_snprintf
...
and fix differently signed comparation.
2011-04-08 14:18:40 +00:00
Petr Rockai
968cdc0066
Add rudimentary versioning to the dmevend protocol, allowing us to detect the
...
(protocol) version of the running dmeventd on the client side.
Right now this is only used in dmeventd -R.
2011-04-04 16:11:09 +00:00
Zdenek Kabelac
81e269fe15
Keep noreturn attribute for lvm_thread_fn
...
Even thought my gcc seems to not need it, as it's deduced from pthread_exit(),
keep it here for older compiler to avoid getting warnings.
2011-03-30 12:48:16 +00:00
Zdenek Kabelac
e3cce4b66a
Better shutdown for clvmd
...
'a small step' towards cleaner shutdown sequence.
Normally clvmd doens't care about unreleased memory on exit -
but for valgrind testing it's better to have them cleaned all.
So - few things are left on exit path - this patch starts to remove
just some of them.
1. lvm_thread_fs is made as a thread which could be joined on exit()
2. memory allocated to local_clien_head list is released.
(this part is somewhat more complex if the proper reaction is
needed - and as it requires some heavier code moving - it will
be resolved later.
2011-03-30 12:36:19 +00:00