master - replicator: remove the code
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6ac1e04b3a6f57b65b66e95eff5640a023c4eaf9 Commit: 6ac1e04b3a6f57b65b66e95eff5640a023c4eaf9 Parent: e14c0cabd961432d25d36ae11a26c47a7962ac24 Author: David Teigland <[email protected]> AuthorDate: Fri Oct 13 14:43:15 2017 -0500 Committer: David Teigland <[email protected]> CommitterDate: Fri Oct 13 16:20:42 2017 -0500
replicator: remove the code
It has not been used in a long time and is not
expected to be used further.
--- WHATS_NEW | 1 + configure.in | 17 - include/configure.h.in | 3 - lib/Makefile.in | 10 - lib/activate/activate.c | 21 +- lib/activate/dev_manager.c | 146 ------- lib/commands/toolcontext.c | 5 - lib/format_text/flags.c | 2 - lib/locking/locking.h | 5 +- lib/metadata/lv.h | 4 - lib/metadata/lv_manip.c | 1 - lib/metadata/merge.c | 28 -- lib/metadata/metadata-exported.h | 90 ----- lib/metadata/metadata.c | 4 - lib/metadata/metadata.h | 5 - lib/metadata/replicator_manip.c | 686 --------------------------------- lib/metadata/segtype.h | 8 - lib/metadata/vg.h | 2 - lib/replicator/.exported_symbols | 1 - lib/replicator/Makefile.in | 25 -- lib/replicator/replicator.c | 792 -------------------------------------- tools/vgchange.c | 10 +- 22 files changed, 7 insertions(+), 1859 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.176 - =================================== + Remove the replicator code, including configure --with-replicators. Allow lvcreate --type mirror to work with 100%FREE. Improve selection of resource name for complex volume activation lock. Avoid cutting first character of resource name for activation lock.
configure.in +0 -17
@@ -408,22 +408,6 @@ AC_DEFINE_UNQUOTED([DEFAULT_RAID10_SEGTYPE], ["$DEFAULT_RAID10_SEGTYPE"], [Default segtype used for raid10 volumes.]) ################################################################################ -dnl -- asynchronous volume replicator inclusion type -AC_MSG_CHECKING(whether to include replicators) -AC_ARG_WITH(replicators, - AC_HELP_STRING([--with-replicators=TYPE], - [replicator support: internal/shared/none [none]]), - REPLICATORS=$withval, REPLICATORS=none) -AC_MSG_RESULT($REPLICATORS) - -case "$REPLICATORS" in - none|shared) ;; - internal) AC_DEFINE([REPLICATOR_INTERNAL], 1, - [Define to 1 to include built-in support for replicators.]) ;; - *) AC_MSG_ERROR([--with-replicators parameter invalid ($REPLICATORS)]) ;; -esac - - AC_ARG_WITH(default-sparse-segtype, AC_HELP_STRING([--with-default-sparse-segtype=TYPE], [default sparse segtype: thin/snapshot [thin]]),
@@ -2211,7 +2195,6 @@ lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile -lib/replicator/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile
include/configure.h.in +0 -3
@@ -685,9 +685,6 @@ /* Define to 1 to include the LVM readline shell. */ #undef READLINE_SUPPORT -/* Define to 1 to include built-in support for replicators. */ -#undef REPLICATOR_INTERNAL - /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE
lib/Makefile.in +0 -10
@@ -36,10 +36,6 @@ ifeq ("@RAID@", "shared") SUBDIRS += raid endif -ifeq ("@REPLICATORS@", "shared") - SUBDIRS += replicator -endif - ifeq ("@THIN@", "shared") SUBDIRS += thin endif
@@ -106,7 +102,6 @@ SOURCES =\ metadata/pv_manip.c \ metadata/pv_map.c \ metadata/raid_manip.c \ - metadata/replicator_manip.c \ metadata/segtype.c \ metadata/snapshot_manip.c \ metadata/thin_manip.c \
@@ -165,10 +160,6 @@ ifeq ("@RAID@", "internal") SOURCES += raid/raid.c endif -ifeq ("@REPLICATORS@", "internal") - SOURCES += replicator/replicator.c -endif - ifeq ("@THIN@", "internal") SOURCES += thin/thin.c endif
@@ -215,7 +206,6 @@ ifeq ($(MAKECMDGOALS),distclean) mirror \ notify \ raid \ - replicator \ thin \ cache_segtype \ locking
lib/activate/activate.c +3 -18
@@ -2125,9 +2125,6 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s, goto out; } -if (!lv_read_replicator_vgs (lv)) - goto_out; -lv_calculate_readahead (lv,NULL );/*
@@ -2249,10 +2246,8 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s, out:if (lv_pre_to_free)release_vg (lv_pre_to_free->vg); -if (lv_to_free) { -lv_release_replicator_vgs (lv_to_free); +if (lv_to_free)release_vg (lv_to_free->vg); - }return r; }
@@ -2436,9 +2431,6 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s, const struct logi goto_out; } -if (!lv_read_replicator_vgs (lv)) - goto_out; -if (!monitor_dev_for_events (cmd, lv, &laopts,0 )) stack;
@@ -2453,10 +2445,8 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s, const struct logi r =0 ; } out: -if (lv_to_free) { -lv_release_replicator_vgs (lv_to_free); +if (lv_to_free)release_vg (lv_to_free->vg); - }return r; }
@@ -2571,9 +2561,6 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s, goto out; } -if (!lv_read_replicator_vgs (lv)) - goto_out; -lv_calculate_readahead (lv,NULL );critical_section_inc (cmd,"activating" );
@@ -2585,10 +2572,8 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s, stack; out: -if (lv_to_free) { -lv_release_replicator_vgs (lv_to_free); +if (lv_to_free)release_vg (lv_to_free->vg); - }return r; }
lib/activate/dev_manager.c +0 -146
170 lines not on this page · raw message
lib/commands/toolcontext.c +0 -5
@@ -1501,11 +1501,6 @@ static int _init_segtypes(struct cmd_context *cmd)dm_list_add (&cmd->segtypes, &segtype->list); } -#ifdef REPLICATOR_INTERNAL -if (!init_replicator_segtype (cmd, &seglib)) -return 0 ; -#endif -#ifdef RAID_INTERNAL if (!init_raid_segtypes (cmd, &seglib))return 0 ;
lib/format_text/flags.c +0 -2
@@ -90,8 +90,6 @@ static const struct flag _lv_flags[] = { {PARTIAL_LV, NULL, 0}, {POSTORDER_FLAG, NULL, 0}, {VIRTUAL_ORIGIN, NULL, 0}, - {REPLICATOR, NULL, 0}, - {REPLICATOR_LOG, NULL, 0}, {THIN_VOLUME, NULL, 0}, {THIN_POOL, NULL, 0}, {THIN_POOL_DATA, NULL, 0},
lib/locking/locking.h +1 -4
@@ -166,10 +166,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);#define LCK_LV_CLUSTERED (lv) \ (vg_is_clustered((lv)->vg) ? LCK_CLUSTER_VG : 0) -#define lock_lv_vol (cmd, lv, flags) \ - (find_replicator_vgs((lv)) ? \ - lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv), lv) : \ - 0) +#define lock_lv_vol (cmd, lv, flags) lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv), lv)/* * Activation locks are wrapped around activation commands that have to
lib/metadata/lv.h +0 -4
@@ -19,7 +19,6 @@union lvid ;struct lv_segment ; -struct replicator_device ;enum activation_change ;struct logical_volume {
@@ -43,9 +42,6 @@ struct logical_volume {struct dm_list snapshot_segs;struct lv_segment *snapshot; -struct replicator_device *rdevice;/* For replicator-devs, rimages, slogs - reference to rdevice */ -struct dm_list rsites;/* For replicators - all sites */ -struct dm_list segments;struct dm_list tags;struct dm_list segs_using_this_lv;
lib/metadata/lv_manip.c +0 -1
@@ -5748,7 +5748,6 @@ struct logical_volume *alloc_lv(struct dm_pool *mem)dm_list_init (&lv->tags);dm_list_init (&lv->segs_using_this_lv);dm_list_init (&lv->indirect_glvs); -dm_list_init (&lv->rsites);return lv; }
lib/metadata/merge.c +0 -28
@@ -219,17 +219,6 @@ static void _check_non_raid_seg_members(struct lv_segment *seg, int *error_countraid_seg_error ("non-zero cow LV" );if (!dm_list_empty (&seg->origin_list))/* snap */ raid_seg_error ("non-zero origin_list" ); -/* replicator members (deprecated) */ -if (seg->replicator) -raid_seg_error ("non-zero replicator" ); -if (seg->rlog_lv) -raid_seg_error ("non-zero rlog LV" ); -if (seg->rlog_type) -raid_seg_error ("non-zero rlog type" ); -if (seg->rdevice_index_highest) -raid_seg_error ("non-zero rdevice_index_highests" ); -if (seg->rsite_index_highest) -raid_seg_error ("non-zero rsite_index_highests" );/* .... more members? */ }
@@ -513,8 +502,6 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)struct seg_list *sl;struct glv_list *glvl;int error_count =0 ; -struct replicator_site *rsite; -struct replicator_device *rdev; dm_list_iterate_items(seg, &lv->segments) { seg_count++;
@@ -551,9 +538,6 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg) } } -if (seg_is_replicator (seg) && !check_replicator_segment (seg)) - inc_error_count; -if (complete_vg)_check_lv_segment (lv, seg, seg_count, &error_count);
@@ -655,18 +639,6 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)if (seg->meta_areas &&seg_is_raid_with_meta (seg) && (lv ==seg_metalv (seg, s))) seg_found++; } -if (seg_is_replicator_dev (seg)) { - dm_list_iterate_items(rsite, &seg->replicator->rsites) { - dm_list_iterate_items(rdev, &rsite->rdevices) { -if (lv == rdev->lv || lv == rdev->slog) - seg_found++; - } - } -if (lv == seg->replicator) - seg_found++; - } -if (seg_is_replicator (seg) && lv == seg->rlog_lv) - seg_found++;if (seg->log_lv == lv) seg_found++;if (seg->metadata_lv == lv || seg->pool_lv == lv)
lib/metadata/metadata-exported.h +0 -90
126 lines not on this page · raw message
lib/metadata/metadata.c +0 -4
@@ -2404,8 +2404,6 @@ static int _lv_each_dependency(struct logical_volume *lv,struct dm_list *snh;struct logical_volume *deps[] = { - (lv->rdevice && lv != lv->rdevice->lv) ? lv->rdevice->lv :0 , - (lv->rdevice && lv != lv->rdevice->slog) ? lv->rdevice->slog :0 , lv->snapshot ? lv->snapshot->origin :0 , lv->snapshot ? lv->snapshot->cow :0 };for (i =0 ; i <DM_ARRAY_SIZE (deps); ++i) {
@@ -2418,8 +2416,6 @@ static int _lv_each_dependency(struct logical_volume *lv, return_0;if (lvseg->log_lv && !fn (lvseg->log_lv, data)) return_0; -if (lvseg->rlog_lv && !fn (lvseg->rlog_lv, data)) - return_0;if (lvseg->pool_lv && !fn (lvseg->pool_lv, data)) return_0;if (lvseg->metadata_lv && !fn (lvseg->metadata_lv, data))
lib/metadata/metadata.h +0 -5
@@ -421,11 +421,6 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg);int lv_has_constant_stripes (struct logical_volume *lv);/* -* Checks that a replicator segment is correct. -*/ -int check_replicator_segment (const struct lv_segment *rseg); - -/* * Sometimes (eg, after an lvextend), it is possible to merge two * adjacent segments into a single segment. This function trys * to merge as many segments as possible.
lib/metadata/replicator_manip.c deleted +0 -686
686 lines not on this page · raw message
lib/metadata/segtype.h +0 -8
@@ -36,8 +36,6 @@ struct dev_manager;#define SEG_VIRTUAL (1ULL << 5)#define SEG_CANNOT_BE_ZEROED (1ULL << 6)#define SEG_MONITORED (1ULL << 7) -#define SEG_REPLICATOR (1ULL << 8) -#define SEG_REPLICATOR_DEV (1ULL << 9)#define SEG_RAID (1ULL << 10)#define SEG_THIN_POOL (1ULL << 11)#define SEG_THIN_VOLUME (1ULL << 12)
@@ -198,8 +196,6 @@ struct dev_manager;#define seg_is_raid_with_meta (seg) segtype_is_raid_with_meta((seg)->segtype)#define seg_is_striped_raid (seg) segtype_is_striped_raid((seg)->segtype)#define seg_is_reshapable_raid (seg) segtype_is_reshapable_raid((seg)->segtype) -#define seg_is_replicator (seg) ((seg)->segtype->flags & SEG_REPLICATOR ? 1 : 0) -#define seg_is_replicator_dev (seg) ((seg)->segtype->flags & SEG_REPLICATOR_DEV ? 1 : 0)#define seg_is_snapshot (seg) segtype_is_snapshot((seg)->segtype)#define seg_is_striped (seg) segtype_is_striped((seg)->segtype)#define seg_is_thin (seg) segtype_is_thin((seg)->segtype)
@@ -313,10 +309,6 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd,int init_raid_segtypes (struct cmd_context *cmd,struct segtype_library *seglib);#endif -#ifdef REPLICATOR_INTERNAL -int init_replicator_segtype (struct cmd_context *cmd,struct segtype_library *seglib); -#endif -#define THIN_FEATURE_DISCARDS (1U << 0)#define THIN_FEATURE_EXTERNAL_ORIGIN (1U << 1)#define THIN_FEATURE_HELD_ROOT (1U << 2)
lib/metadata/vg.h +0 -2
@@ -47,8 +47,6 @@ struct volume_group {struct format_instance *fid;const struct format_type *original_fmt;/* Set when processing backup files */ struct lvmcache_vginfo *vginfo; -struct dm_list *cmd_vgs;/* List of wanted/locked and opened VGs */ -uint32_t cmd_missing_vgs;/* Flag marks missing VG */ uint32_t seqno;/* Metadata sequence number */ unsigned skip_validate_lock_args : 1; unsigned lvmetad_update_pending: 1;
lib/replicator/.exported_symbols deleted +0 -1
@@ -1 +0,0 @@ -init_segtype
lib/replicator/Makefile.in deleted +0 -25
@@ -1,25 +0,0 @@ -# -# Copyright (C) 2009-2010 Red Hat, Inc. All rights reserved. -# -# This file is part of LVM2. -# -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License v.2. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ - -SOURCES = replicator.c - -LIB_SHARED = liblvm2replicator.$(LIB_SUFFIX) -LIB_VERSION = $(LIB_VERSION_LVM) - -include $(top_builddir)/make.tmpl - -install: install_lib_shared_plugin
lib/replicator/replicator.c deleted +0 -792
792 lines not on this page · raw message
tools/vgchange.c +2 -8
@@ -114,11 +114,6 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct volume_group *vg,if (lv_is_mirror_image (lv) ||lv_is_mirror_log (lv))continue ; -/* Only request activation of the first replicator-dev LV */ -/* Avoids retry with all heads in case of failure */ -if (lv_is_replicator_dev (lv) && (lv !=first_replicator_dev (lv))) -continue ; -if (lv_activation_skip (lv, activate,arg_is_set (cmd, ignoreactivationskip_ARG)))continue ;
@@ -254,9 +249,8 @@ int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg, }/* Print message only if there was not found a missing VG */ -if (!vg->cmd_missing_vgs) -log_print_unless_silent ("%d logical volume(s) in volume group \"%s\" now active" , -lvs_in_vg_activated (vg), vg->name); +log_print_unless_silent ("%d logical volume(s) in volume group \"%s\" now active" , +lvs_in_vg_activated (vg), vg->name);return r; }