diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-04-28 11:58:26 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-04-28 12:42:53 +0200 |
commit | d1aba7ccf6d1bc5f3bc1fa1b5fe70eec64f8c633 (patch) | |
tree | e437be38229530032dfa1be66f41582675608fb0 | |
parent | 4c405a9b490423fc2dbcc475ca4649f2c4a03f5e (diff) | |
download | lvm2-d1aba7ccf6d1bc5f3bc1fa1b5fe70eec64f8c633.tar.gz |
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...
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | tools/lvscan.c | 13 |
2 files changed, 2 insertions, 12 deletions
@@ -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'. diff --git a/tools/lvscan.c b/tools/lvscan.c index 636ac4538..47e79d634 100644 --- a/tools/lvscan.c +++ b/tools/lvscan.c @@ -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) |