diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-25 13:44:42 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-26 23:29:08 +0200 |
commit | c215e1be5ce35177a0491c0d6495865efbe34b51 (patch) | |
tree | 4644d917d4063f8a65bdb47ef4bf2710e5d92505 | |
parent | d8bdc7af3749cbdc9110057daa837d2fe19dcf72 (diff) | |
download | lvm2-c215e1be5ce35177a0491c0d6495865efbe34b51.tar.gz |
lvchange: always check for sigint
Check sigint() state during process_each_lv.
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | tools/lvchange.c | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,6 @@ Version 2.02.152 - ================================== + Improve support for interrupting procesing of volumes during lvchange. Use failed command return code when lvchanging read-only volume. Show creation transaction_id and zeroing state of pool with thin volume. Stop checking for dm_cache_mq policy with cache target 1.9 (alias to smq). diff --git a/tools/lvchange.c b/tools/lvchange.c index 0f46e2c8f..6a6a6197b 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -907,6 +907,9 @@ static int _lvchange_single(struct cmd_context *cmd, struct logical_volume *lv, struct logical_volume *origin; char snaps_msg[128]; + if (sigint_caught()) + return_ECMD_FAILED; + if (!(lv->vg->status & LVM_WRITE) && (arg_count(cmd, contiguous_ARG) || arg_count(cmd, permission_ARG) || arg_count(cmd, readahead_ARG) || arg_count(cmd, persistent_ARG) || @@ -1062,8 +1065,6 @@ static int _lvchange_single(struct cmd_context *cmd, struct logical_volume *lv, return_ECMD_FAILED; doit += _lvchange_persistent(cmd, lv); docmds++; - if (sigint_caught()) - return_ECMD_FAILED; } if (arg_count(cmd, discards_ARG) || |