1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvscan: drop test for snapshosts

When showing  ACTIVE status for snapshot's origin,
avoid testing all its snapshot - it's not useful
to tell user origin is inactivate, while it's clearly
available and running - just one of its snapshot leg
is invalid...
This commit is contained in:
Zdenek Kabelac 2014-04-28 11:58:26 +02:00
parent 4c405a9b49
commit d1aba7ccf6
2 changed files with 2 additions and 12 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
Show correct availability status for snapshot origin in lvscan.
Move segment thin pool/volume info into segment display 'lvdisplay --maps'.
Display thin pool usage even when just thin volume is available.
Display monitoring status for monitorable segments in 'lvdisplay --maps'.

View File

@ -20,7 +20,6 @@ static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
{
struct lvinfo info;
int inkernel, snap_active = 1;
struct lv_segment *snap_seg = NULL;
percent_t snap_percent; /* fused, fsize; */
const char *active_str, *snapshot_str;
@ -29,17 +28,7 @@ static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_PROCESSED;
inkernel = lv_info(cmd, lv, 0, &info, 0, 0) && info.exists;
if (lv_is_origin(lv)) {
dm_list_iterate_items_gen(snap_seg, &lv->snapshot_segs,
origin_list) {
if (inkernel &&
(snap_active = lv_snapshot_percent(snap_seg->cow,
&snap_percent)))
if (snap_percent == PERCENT_INVALID)
snap_active = 0;
}
snap_seg = NULL;
} else if (lv_is_cow(lv)) {
if (lv_is_cow(lv)) {
if (inkernel &&
(snap_active = lv_snapshot_percent(lv, &snap_percent)))
if (snap_percent == PERCENT_INVALID)