~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to lib/mirror/mirrored.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140819153706-i1gaio8lg534dara
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "text_export.h"
22
22
#include "text_import.h"
23
23
#include "config.h"
24
 
#include "defaults.h"
25
24
#include "lvm-string.h"
26
25
#include "targets.h"
27
26
#include "activate.h"
167
166
}
168
167
 
169
168
static int _mirrored_target_percent(void **target_state,
170
 
                                    percent_t *percent,
 
169
                                    dm_percent_t *percent,
171
170
                                    struct dm_pool *mem,
172
171
                                    struct cmd_context *cmd,
173
172
                                    struct lv_segment *seg, char *params,
214
213
        if (seg)
215
214
                seg->extents_copied = seg->area_len * numerator / denominator;
216
215
 
217
 
        *percent = make_percent(numerator, denominator);
 
216
        *percent = dm_make_percent(numerator, denominator);
218
217
 
219
218
        return 1;
220
219
}
498
497
                 * otherwise, the kernel module will fail to make
499
498
                 * contact.
500
499
                 */
501
 
                if (dm_daemon_is_running(CMIRRORD_PIDFILE)) {
 
500
                if (cmirrord_is_running()) {
502
501
                        struct utsname uts;
503
502
                        unsigned kmaj, kmin, krel;
504
503
                        /*
532
531
        return _mirrored_present;
533
532
}
534
533
 
535
 
#ifdef DMEVENTD
 
534
#  ifdef DMEVENTD
536
535
static const char *_get_mirror_dso_path(struct cmd_context *cmd)
537
536
{
538
537
        return get_monitor_dso_path(cmd, find_config_tree_str(cmd, dmeventd_mirror_library_CFG, NULL));
562
561
        return _target_set_events(seg, events, 0);
563
562
}
564
563
 
565
 
#endif /* DMEVENTD */
566
 
#endif /* DEVMAPPER_SUPPORT */
 
564
#  endif /* DMEVENTD */
567
565
 
568
566
static int _mirrored_modules_needed(struct dm_pool *mem,
569
567
                                    const struct lv_segment *seg,
586
584
 
587
585
        return 1;
588
586
}
 
587
#endif /* DEVMAPPER_SUPPORT */
589
588
 
590
589
static void _mirrored_destroy(struct segment_type *segtype)
591
590
{
603
602
        .target_percent = _mirrored_target_percent,
604
603
        .target_present = _mirrored_target_present,
605
604
        .check_transient_status = _mirrored_transient_status,
 
605
        .modules_needed = _mirrored_modules_needed,
606
606
#  ifdef DMEVENTD
607
607
        .target_monitored = _target_registered,
608
608
        .target_monitor_events = _target_monitor_events,
609
609
        .target_unmonitor_events = _target_unmonitor_events,
610
610
#  endif        /* DMEVENTD */
611
611
#endif
612
 
        .modules_needed = _mirrored_modules_needed,
613
612
        .destroy = _mirrored_destroy,
614
613
};
615
614