master - pvmove: remove some cmirror related code
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fe16d296b058333fddd5102afbebf95a18f85468 Commit: fe16d296b058333fddd5102afbebf95a18f85468 Parent: df26b73b8e4355df7f6d4d664edad2b86991b352 Author: David Teigland <[email protected]> AuthorDate: Fri Oct 11 11:12:11 2019 -0500 Committer: David Teigland <[email protected]> CommitterDate: Fri Oct 11 11:31:42 2019 -0500
pvmove: remove some cmirror related code
which is no longer used
--- lib/metadata/metadata-exported.h | 2 - lib/metadata/mirror.c | 41 +------------------------------------- lib/mirror/mirrored.c | 30 --------------------------- tools/pvmove.c | 14 +------------ 4 files changed, 2 insertions(+), 85 deletions(-)
lib/metadata/metadata-exported.h +0 -2
@@ -1152,8 +1152,6 @@ int is_temporary_mirror_layer(const struct logical_volume *lv);struct logical_volume *find_temporary_mirror (const struct logical_volume *lv);uint32_t lv_mirror_count (const struct logical_volume *lv); -/* Remove CMIRROR_REGION_COUNT_LIMIT when http://bugzilla.redhat.com/682771 is fixed */ -#define CMIRROR_REGION_COUNT_LIMIT (256*1024 * 8)uint32_t adjusted_mirror_region_size (struct cmd_context *cmd,uint32_t extent_size,uint32_t extents,uint32_t region_size,int internal,int clustered);
lib/metadata/mirror.c +1 -40
53 lines not on this page · raw message
lib/mirror/mirrored.c +0 -30
@@ -429,40 +429,10 @@ static int _mirrored_target_present(struct cmd_context *cmd, sscanf(vsn, "%u.%u.%u", &maj2, &min2, &patchlevel2) == 3 && maj2 == 4 && min2 == 5 && patchlevel2 == 0))) /* RHEL4U3 */ _block_on_error_available =1 ; - -#ifdef CMIRRORD_PIDFILE -/* -* The cluster mirror log daemon must be running, -* otherwise, the kernel module will fail to make -* contact. -*/ -if (cmirrord_is_running ()) { -struct utsname uts; -unsigned kmaj, kmin, krel; -/* -* The dm-log-userspace module was added to the -* 2.6.31 kernel. -*/ -if (!uname (&uts) && - (sscanf (uts.release,"%u.%u.%u" , &kmaj, &kmin, &krel) ==3 ) && -KERNEL_VERSION (kmaj, kmin, krel) <KERNEL_VERSION (2 ,6 ,31 )) { -if (module_present (cmd,MODULE_NAME_LOG_CLUSTERED )) - _mirror_attributes |=MIRROR_LOG_CLUSTERED ; - }else if (module_present (cmd,MODULE_NAME_LOG_USERSPACE )) - _mirror_attributes |=MIRROR_LOG_CLUSTERED ; - -if (!(_mirror_attributes &MIRROR_LOG_CLUSTERED )) -log_verbose ("Cluster mirror log module is not available." ); - }else -log_verbose ("Cluster mirror log daemon is not running." ); -#else -log_verbose ("Cluster mirror log daemon not included in build." ); -#endif }/* * Check only for modules if atttributes requested and no previous check. -* FIXME: Fails incorrectly if cmirror was built into kernel. */ if (attributes) *attributes = _mirror_attributes;
tools/pvmove.c +1 -13
@@ -40,27 +40,15 @@ struct pvmove_params {static int _pvmove_target_present (struct cmd_context *cmd,int clustered) {const struct segment_type *segtype; -unsigned attr =0 ;int found =1 ; -static int _clustered_found =-1 ; - -if (clustered && _clustered_found >=0 ) -return _clustered_found;if (!(segtype =get_segtype_from_string (cmd,SEG_TYPE_NAME_MIRROR ))) return_0;if (activation () && segtype->ops->target_present && - !segtype->ops->target_present (cmd,NULL , clustered ? &attr :NULL )) + !segtype->ops->target_present (cmd,NULL ,NULL )) found =0 ; -if (activation () && clustered) { -if (found && (attr &MIRROR_LOG_CLUSTERED )) - _clustered_found = found =1 ; -else - _clustered_found = found =0 ; - } -return found; }