master - fix: also make commit b4637 work without dmeventd
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e02ff3226021ddaf0861f65637d9be65d855506b Commit: e02ff3226021ddaf0861f65637d9be65d855506b Parent: e4c7236c07056ddc9af3ba6ad2314d649d6814f9 Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Sep 30 08:17:56 2013 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Sep 30 08:17:56 2013 +0200
fix: also make commit b4637 work without dmeventd
--- lib/raid/raid.c | 44 ++++++++++++++++++++++---------------------- lib/thin/thin.c | 53 +++++++++++++++++++++++++++-------------------------- 2 files changed, 49 insertions(+), 48 deletions(-)
lib/raid/raid.c +22 -22
@@ -282,28 +282,6 @@ static void _raid_destroy(struct segment_type *segtype) }#ifdef DEVMAPPER_SUPPORT -#ifdef DMEVENTD -static const char *_get_raid_dso_path (struct cmd_context *cmd) -{ -const char *config_str =find_config_tree_str (cmd, dmeventd_raid_library_CFG,NULL ); -return get_monitor_dso_path (cmd, config_str); -} - -static int _raid_target_present (struct cmd_context *cmd, -const struct lv_segment *seg __attribute__((unused)), -unsigned *attributes __attribute__((unused))) -{ -static int _raid_checked =0 ; -static int _raid_present =0 ; - -if (!_raid_checked) - _raid_present =target_present (cmd,"raid" ,1 ); - - _raid_checked =1 ; - -return _raid_present; -} - static int _raid_target_percent(void **target_state, percent_t *percent, struct dm_pool *mem,
@@ -346,6 +324,28 @@ static int _raid_target_percent(void **target_state,return 1 ; } +static int _raid_target_present (struct cmd_context *cmd, +const struct lv_segment *seg __attribute__((unused)), +unsigned *attributes __attribute__((unused))) +{ +static int _raid_checked =0 ; +static int _raid_present =0 ; + +if (!_raid_checked) + _raid_present =target_present (cmd,"raid" ,1 ); + + _raid_checked =1 ; + +return _raid_present; +} + +#ifdef DMEVENTD +static const char *_get_raid_dso_path (struct cmd_context *cmd) +{ +const char *config_str =find_config_tree_str (cmd, dmeventd_raid_library_CFG,NULL ); +return get_monitor_dso_path (cmd, config_str); +} +static int _raid_target_monitored (struct lv_segment *seg,int *pending) {struct cmd_context *cmd = seg->lv->vg->cmd;
lib/thin/thin.c +27 -26
65 lines not on this page · raw message