1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

100 Commits

Author SHA1 Message Date
Alasdair Kergon
1ff0ef6945 Fix renamed dso. 2006-01-27 20:51:36 +00:00
Alasdair Kergon
6463fa2993 dmeventd thread termination fix 2006-01-27 20:50:01 +00:00
Alasdair Kergon
fc2b1f2ce9 some init_client cleanup 2006-01-27 20:49:13 +00:00
Alasdair Kergon
f0b4c52d4a More dmeventd mirror cleanups. 2006-01-27 20:48:19 +00:00
Alasdair Kergon
17840c21c3 Remove avoidable dmeventd mirror forking. 2006-01-27 20:47:20 +00:00
Alasdair Kergon
7000cdb5ea Fix libdevmapper event daemon_running status. 2006-01-27 20:46:06 +00:00
Alasdair Kergon
3bee15b0fb Replace deprecated signal functions. 2006-01-27 20:45:17 +00:00
Alasdair Kergon
cb49c5a03f Use split_dm_name in dmeventd mirror code. 2006-01-27 20:43:52 +00:00
Alasdair Kergon
132a76156e fix dmevent registration return codes 2006-01-27 20:01:45 +00:00
Alasdair Kergon
74892f5c3d read/write loop fixes 2005-12-19 22:56:47 +00:00
Alasdair Kergon
ce7ed2c0a9 Change dm_tree_node_add_mirror_target_log parm order 2005-12-19 21:03:17 +00:00
Alasdair Kergon
e66f1197d6 comments 2005-12-13 13:34:31 +00:00
Alasdair Kergon
3c588200fe Fix dmeventd build. 2005-12-05 11:16:48 +00:00
Alasdair Kergon
16da207de2 fix exports 2005-12-02 21:00:33 +00:00
Alasdair Kergon
06f62ad1e4 Add mirror dmeventd library 2005-12-02 19:52:06 +00:00
Alasdair Kergon
dd3ec4e87a dmeventd updates 2005-12-02 15:39:16 +00:00
Patrick Caulfield
47b59176e0 Make it compile with debug enabled. 2005-11-10 08:49:29 +00:00
Patrick Caulfield
c650c19805 Use hash functions in libdevmapper. 2005-11-09 09:24:10 +00:00
Alasdair Kergon
2262b32057 Use hash, bitset, malloc, pool from libdevmapper. 2005-10-16 23:03:59 +00:00
Patrick Caulfield
fe6c78629d clvmd no longer takes out locks for non-clusteed LVs,
and non-clustered LVs are only activated on the local node.
2005-08-16 08:25:09 +00:00
Alasdair Kergon
07d318310b Prepare tools to support clustered mirrors. 2005-08-14 23:18:28 +00:00
Patrick Caulfield
4bb7474e8a Don't send a signal to kill threads that are idling nicely as it upsets them.
This seems to cure bz#159727 on SMP systems.

Alasdair, can you include this patch in the lvm2-cluster package please ?
2005-08-09 10:39:57 +00:00
Benjamin Marzinski
7bfd1238ce Fixing some makesfiles, so that the correct things link against pthreads.
Also changed dmevent so that in no longer links against pthreads, and
dynamically loads libdmevent.so.  Everything seems to work just fine like this.
2005-06-14 19:06:26 +00:00
Patrick Caulfield
470b46cee1 Log an error if clvmd can't resolve a host name got from CCS
Fix potential spin loop in clvmd
2005-06-14 10:35:02 +00:00
Patrick Caulfield
5a3f4a794d Don't defer closing of FDs in clvmd as it can cause trouble. 2005-06-13 10:16:21 +00:00
Patrick Caulfield
eeee8cfd31 Be a bit smarter about reading stuff from the sockets 2005-06-10 09:11:01 +00:00
Benjamin Marzinski
5469414bf8 Timeout event implementation:
The daemon side of this is mostly the same as the patch I sent out.  To select
a timeout period different than the default and to get the timeout period,
I added two library calls, dm_set_event_timeout() and dm_get_event_timeout().
If people are against them, the other option is to tack extra arguments onto
dm_regiser_for_event() and dm_get_registered_device().  I also added a
-t option to dmevent, so people can try out timeouts.
2005-06-09 18:40:49 +00:00
AJ Lewis
8e6230ddd9 Change the multilog code to toggle between async and sync writes for all
log types.  This means the threaded_syslog type is no longer valid.  A new
fxn multilog_async is available to toggle between the two modes.  If an
app is compiled without pthreads and tries to use async logging, no logging
will occur while async is enabled.

dmeventd has been modified to use the new code

I'm not positive I like the way the async_logger code calls the log fxn,
but it works for now.  Suggestions for other ways to do it would be helpful
2005-05-25 21:08:36 +00:00
Heinz Mauelshagen
9e0419057c Exit after last unregister_for_event() 2005-05-20 13:53:26 +00:00
AJ Lewis
bca1803fea o Changed the multilog API a bit (I warned you)
- multilog_add_type, multilog_del_type, multilog_custom, and
     multilog_init_verbose all have different arguments.
   - Primary change is that caller only passes in config info, and the
     lib keeps track of state internally.  No more exporting of
     'struct log_data'.
   - Custom callers now only get the custom data pointer passed into their
     log fxn (that is set with multilog_custom)
   - Added basic README that describes libmultilog
2005-05-09 18:44:35 +00:00
Benjamin Marzinski
f60f128448 oops. Those are char **'s not char *'s 2005-05-04 19:24:03 +00:00
Benjamin Marzinski
cbac299f5b fixed dmevent so that it doesn't do a double free when you run
# dmevent -l

Also, changed the behaviour of dm_get_registered_device(), so that it doesn't
change the pointer you passed in without freeing the memory on a non-next call,
and doesn't free your pointer without setting it to NULL on a failed next call.
2005-05-04 18:53:28 +00:00
Heinz Mauelshagen
40773cd620 o libmultilog needs introducing of list locking in order to stand
multilog_add_type()/multilog_del_type cycles correctly.
o fixed segfault in multilog_add_type()
o fixed test-multilog.c
o cleaned up libmultilog (list macros, indentation, braces, comments)
2005-05-04 11:52:07 +00:00
Jonathan Earl Brassow
1862e88ffa - make noop use multilog
- add event_nr to thread_status struct and set appropriately so that the
  thread actually waits for an event
- essentially make error_detected return true.  Let the DSOs determine
  how to interpret the status info
2005-05-04 01:57:31 +00:00
AJ Lewis
cd4355d8f4 o stick multilog into the dm-event lib and dmeventd code again
o more tweaks to libmultilog calls - the api isn't set in stone yet, so
   don't get too comfortable.
 o not sure the dmeventd in device-mapper/dmeventd works - i've been using
   the one in lib/event/
 o currently both daemons are set to log only to syslog
2005-05-03 21:29:13 +00:00
Heinz Mauelshagen
1d76599a94 working dm_get_registered_device(). dmevent.c update to use it. 2005-05-03 16:15:20 +00:00
Heinz Mauelshagen
088e6e29da more dm_get_registered_device() code 2005-05-03 13:50:42 +00:00
Benjamin Marzinski
4396ee160a dmeventd was looking for dsos with libdmeventd<name>.so
The Makefile turned noop.c into    libdmeventnoop.so
The Makefile now turns noop.c into libdmeventdnoop.so
2005-05-02 19:34:25 +00:00
Benjamin Marzinski
64f4fd6e2b stopped printing a string after we erased the pointer to it. 2005-05-02 18:43:23 +00:00
Benjamin Marzinski
33c1c56800 removed the -lmultilog for now. 2005-05-02 18:42:07 +00:00
Benjamin Marzinski
1e8221b3ad get the makefile to clean up the .o's 2005-05-02 17:41:54 +00:00
Heinz Mauelshagen
c4763cf8c9 Introduce exit() in main() and cleanup signal settings for parent/child 2005-05-02 11:02:19 +00:00
Benjamin Marzinski
d4d51bd6d3 more variable initialization. 2005-04-29 22:12:09 +00:00
Heinz Mauelshagen
d54da54d67 o checking in instrumented code for AJ to follow up on comms and logging
o changed

  int dm_get_next_registered_device(char **dso_name, char **device,
                                    enum event_type *events);

  to

  int dm_get_registered_device(char **dso_name, char **device,
                               enum event_type *events, int next)

  so that the daemon is able to retrive the next one of the list without
  running into locking issues.

o changed dmevent.c to use dm_get_registered_device()

o couldn't test this yet because of the comms issues
  (daemon exits in do_process_request())
2005-04-29 14:56:35 +00:00
Heinz Mauelshagen
96c5c1f9ea first changes to get comms back to work after flock changes 2005-04-29 13:41:25 +00:00
Heinz Mauelshagen
b0e25eef22 minor cleanup 2005-04-29 10:58:34 +00:00
AJ Lewis
871e7fcd1a o Build dmeventd against multilog 2005-04-28 22:47:52 +00:00
Alasdair Kergon
db6c5ba5b2 build libdmeventnoop.so for testing 2005-04-28 17:32:27 +00:00
Alasdair Kergon
42712811e3 test.c->dmevent.c 2005-04-28 14:49:41 +00:00
Alasdair Kergon
e4fe47bc19 o adds dm_get_next_registered_device() (not functional yet)
to retrieve which devices got registered with the daemon;
  needs locking changes as well
2005-04-28 14:02:30 +00:00