master - lvchange: missed bits for a8aee7dba2b76
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=26dd17f8345f512a48768f7fcf74e0c65558032c Commit: 26dd17f8345f512a48768f7fcf74e0c65558032c Parent: 45f57477f46368fbad1864e4606690b274dd2e7d Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Sep 24 16:27:35 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Sep 24 16:30:02 2014 +0200
lvchange: missed bits for a8aee7dba2b76
lv_info is not used here any more.
This code should have been committed withlv_check_not_in_use API change commit.
--- tools/lvchange.c | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-)
tools/lvchange.c +11 -14
@@ -281,7 +281,6 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv)int active =0 ;int exclusive =0 ;int monitored; -struct lvinfo info;struct lv_segment *seg =first_seg (lv);struct dm_list device_list;struct lv_list *lvl;
@@ -311,20 +310,18 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv)return 0 ; } -if (info.exists) { -if (!arg_count (cmd, yes_ARG) && -yes_no_prompt ("Do you really want to deactivate " -"logical volume %s to resync it? [y/n]: " , - lv->name) =='n' ) { -log_error ("Logical volume \"%s\" not resynced" , - lv->name); -return 0 ; - } - - active =1 ; -if (lv_is_active_exclusive_locally (lv)) - exclusive =1 ; +if (!arg_count (cmd, yes_ARG) && +yes_no_prompt ("Do you really want to deactivate " +"logical volume %s to resync it? [y/n]: " , + lv->name) =='n' ) { +log_error ("Logical volume \"%s\" not resynced" , + lv->name); +return 0 ; } + + active =1 ; +if (lv_is_active_exclusive_locally (lv)) + exclusive =1 ; }if (seg_is_raid (seg) && active && !exclusive) {