From 5cb0d45d18eb6a4f33804f00766529ee12186658 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Fri, 22 Jan 2010 13:28:54 +0000 Subject: [PATCH] Removed inactive_table check from _lv_has_target_type. This check doesn't offer any benefit (that I can recall) and testing validates that. --- lib/activate/dev_manager.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 89493739c..3d3c14b8d 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -327,7 +327,6 @@ static int _status(const char *name, const char *uuid, return 0; } -/* FIXME Is there anything simpler to check for instead? */ static int _lv_has_target_type(struct dev_manager *dm, struct logical_volume *lv, const char *layer, @@ -363,8 +362,7 @@ static int _lv_has_target_type(struct dev_manager *dm, &type, ¶ms); if (type && strncmp(type, target_type, strlen(target_type)) == 0) { - /* FIXME Why the inactive test? */ - if (info.live_table && !info.inactive_table) + if (info.live_table) r = 1; break; } @@ -1141,6 +1139,7 @@ static int _add_new_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, 0, 1, 0, &dinfo, NULL) && dinfo.open_count) || (dev_manager_info(dm->mem, NULL, find_merging_cow(lv)->cow, 0, 1, 0, &dinfo, NULL) && dinfo.open_count)) { + /* FIXME Is there anything simpler to check for instead? */ if (!_lv_has_target_type(dm, lv, NULL, "snapshot-merge")) clear_snapshot_merge(lv); } -- 2.43.5