mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
snapshot: fix check for snapshot-merge target presence
If calling _snap_target_present on 2nd and later call and for a segment with MERGING flag set, we must return the status of snapshot as well as snapshot-merge target presence, not just the snapshot one.
This commit is contained in:
parent
f12d88f840
commit
4f6c2951d6
@ -162,9 +162,11 @@ static int _snap_target_present(struct cmd_context *cmd,
|
||||
_snap_checked = 1;
|
||||
}
|
||||
|
||||
if (!_snap_merge_checked && seg && (seg->status & MERGING)) {
|
||||
if (seg && (seg->status & MERGING)) {
|
||||
if (!_snap_merge_checked) {
|
||||
_snap_merge_present = target_present(cmd, "snapshot-merge", 0);
|
||||
_snap_merge_checked = 1;
|
||||
}
|
||||
return _snap_present && _snap_merge_present;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user