mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
Removed inactive_table check from _lv_has_target_type. This check
doesn't offer any benefit (that I can recall) and testing validates that.
This commit is contained in:
parent
81d19574f7
commit
5cb0d45d18
@ -327,7 +327,6 @@ static int _status(const char *name, const char *uuid,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME Is there anything simpler to check for instead? */
|
|
||||||
static int _lv_has_target_type(struct dev_manager *dm,
|
static int _lv_has_target_type(struct dev_manager *dm,
|
||||||
struct logical_volume *lv,
|
struct logical_volume *lv,
|
||||||
const char *layer,
|
const char *layer,
|
||||||
@ -363,8 +362,7 @@ static int _lv_has_target_type(struct dev_manager *dm,
|
|||||||
&type, ¶ms);
|
&type, ¶ms);
|
||||||
if (type && strncmp(type, target_type,
|
if (type && strncmp(type, target_type,
|
||||||
strlen(target_type)) == 0) {
|
strlen(target_type)) == 0) {
|
||||||
/* FIXME Why the inactive test? */
|
if (info.live_table)
|
||||||
if (info.live_table && !info.inactive_table)
|
|
||||||
r = 1;
|
r = 1;
|
||||||
break;
|
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) ||
|
0, 1, 0, &dinfo, NULL) && dinfo.open_count) ||
|
||||||
(dev_manager_info(dm->mem, NULL, find_merging_cow(lv)->cow,
|
(dev_manager_info(dm->mem, NULL, find_merging_cow(lv)->cow,
|
||||||
0, 1, 0, &dinfo, NULL) && dinfo.open_count)) {
|
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"))
|
if (!_lv_has_target_type(dm, lv, NULL, "snapshot-merge"))
|
||||||
clear_snapshot_merge(lv);
|
clear_snapshot_merge(lv);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user