master - snapshots: check for active state
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=272f5ae208d20dc56599e61b37e74afac05a1140 Commit: 272f5ae208d20dc56599e61b37e74afac05a1140 Parent: 1cdb6ca2b246bf5dc680abde3b0a2ea0192f1aaf Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Jun 11 13:07:13 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Jun 11 13:57:18 2013 +0200
snapshots: check for active state
Fix testing if the snapshot could be resized and use lv_is_active() to get correct answer in cluster.
--- WHATS_NEW | 1 + tools/lvresize.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Fix test for active snapshot in cluster before resizing it. Report backtrace from dump filter error path. Do not use persistent filter with lvmetad. Composable persistent filter functionality for global filter.
tools/lvresize.c +1 -2
@@ -362,7 +362,6 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg, struct lvresize_params *lp) {struct logical_volume *lv; -struct lvinfo info;uint32_t stripesize_extents;uint32_t seg_stripes =0 , seg_stripesize =0 , seg_size;uint32_t seg_mirrors =0 ;
@@ -762,7 +761,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,return ECMD_FAILED ; } -if (lv_info (cmd, lv,0 , &info,0 ,0 ) && info.exists) { +if (lv_is_active (lv)) {log_error ("Snapshot origin volumes can be resized " "only while inactive: try lvchange -an" );return ECMD_FAILED ;