master - cleanup: add braces for if()
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d1dcbe085370ba...
Commit: d1dcbe085370ba194b6598bb9440550edb7f184f
Parent: 52ab15b2d0803fee480c404a458f3b568507a53a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jul 2 10:28:39 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:43 2014 +0200
cleanup: add braces for if()
---
libdm/regex/parse_rx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/regex/parse_rx.c b/libdm/regex/parse_rx.c
index 0ad033a..bc0e619 100644
--- a/libdm/regex/parse_rx.c
+++ b/libdm/regex/parse_rx.c
@@ -67,7 +67,7 @@ static void _regex_print(struct rx_node *rx, int depth, unsigned show_nodes)
printf("[");
for (i = 0; i < 256; i++)
if (dm_bit(rx->charset, i)) {
- if isprint(i)
+ if (isprint(i))
printf("%c", (char) i);
else if (i == HAT_CHAR)
printf("^");
9 years, 8 months
master - cleanup: use unsigned type for command
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=52ab15b2d0803f...
Commit: 52ab15b2d0803fee480c404a458f3b568507a53a
Parent: 57f8b33d5de8c93ee48f4d1caa69ac3fd45d05d0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jul 2 10:27:13 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:43 2014 +0200
cleanup: use unsigned type for command
Keep command unsigned (as _IOWR() produces them).
---
libdm/ioctl/libdm-targets.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/ioctl/libdm-targets.h b/libdm/ioctl/libdm-targets.h
index 8fc8738..54223c7 100644
--- a/libdm/ioctl/libdm-targets.h
+++ b/libdm/ioctl/libdm-targets.h
@@ -74,7 +74,7 @@ struct dm_task {
struct cmd_data {
const char *name;
- const int cmd;
+ const unsigned cmd;
const int version[3];
};
9 years, 8 months
master - cleanup: a bit better error message
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=57f8b33d5de8c9...
Commit: 57f8b33d5de8c93ee48f4d1caa69ac3fd45d05d0
Parent: 165cfab7db386942162f819d247ce64ab5436119
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jul 2 09:50:04 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:43 2014 +0200
cleanup: a bit better error message
---
tools/lvconvert.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 085fdcd..4f29416 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2759,13 +2759,12 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
return 0;
}
if (metadata_lv == pool_lv) {
- log_error("Can't use same LV for thin pool data and metadata LV %s.",
- lp->pool_metadata_lv_name);
+ log_error("Can't use same LV for thin pool data and metadata LV %s/%s.",
+ metadata_lv->vg->name, metadata_lv->name);
return 0;
}
if (lv_is_thin_type(metadata_lv)) {
- log_error("Can't use thin pool logical volume %s/%s "
- "for thin pool metadata.",
+ log_error("Can't use thin type LV %s/%s for thin pool metadata.",
metadata_lv->vg->name, metadata_lv->name);
return 0;
}
9 years, 8 months
master - cleanup: verbose in human readable size
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=165cfab7db3869...
Commit: 165cfab7db386942162f819d247ce64ab5436119
Parent: 6b3a49876eb36b5b97e7fbd7935208f0d85607e0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 1 11:03:31 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:42 2014 +0200
cleanup: verbose in human readable size
Use normal size like we use everywhere else.
---
tools/lvconvert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index a6187a0..085fdcd 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -446,7 +446,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
"range 4K to 512K");
return 0;
}
- log_verbose("Setting chunksize to %d sectors.", lp->chunk_size);
+ log_verbose("Setting chunk size to %s.", display_size(cmd, lp->chunk_size));
if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot")))
return_0;
9 years, 8 months
master - cleanup: line indent
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6b3a49876eb36b...
Commit: 6b3a49876eb36b5b97e7fbd7935208f0d85607e0
Parent: 748af97afc30d65a9b89d877fdbd2e12ea8fb8e3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 1 10:17:41 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:42 2014 +0200
cleanup: line indent
---
tools/lvconvert.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index ca58a1f..a6187a0 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -305,7 +305,8 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
return 0;
}
if (mirror_or_raid_type_requested(cmd, type_str)) {
- log_error("--%spool and --mirrors/--type mirror/--type raid* are mutually exlusive.", cache_pool ? "type cache_" : "thin");
+ log_error("--%spool and --mirrors/--type mirror/--type raid* are mutually exlusive.",
+ cache_pool ? "type cache_" : "thin");
return 0;
}
if (arg_count(cmd, repair_ARG)) {
@@ -314,11 +315,13 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
return 0;
}
if (snapshot_type_requested(cmd, type_str)) {
- log_error("--%spool and --snapshot/--type snapshot are mutually exlusive.", cache_pool ? "type cache_" : "thin");
+ log_error("--%spool and --snapshot/--type snapshot are mutually exlusive.",
+ cache_pool ? "type cache_" : "thin");
return 0;
}
if (arg_count(cmd, splitmirrors_ARG)) {
- log_error("--%spool and --splitmirrors are mutually exlusive.", cache_pool ? "type cache_" : "thin");
+ log_error("--%spool and --splitmirrors are mutually exlusive.",
+ cache_pool ? "type cache_" : "thin");
return 0;
}
if (!cache_pool)
9 years, 8 months
master - cleanup: libdm simplier error comparation
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=748af97afc30d6...
Commit: 748af97afc30d65a9b89d877fdbd2e12ea8fb8e3
Parent: e21d0eb90e9a842ca5fd4d09c076f5fb894ba6ca
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jul 2 00:00:31 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:42 2014 +0200
cleanup: libdm simplier error comparation
When testing return value from snprintf
use simplier form '>=' instead of '+1 >'.
---
libdm/libdm-string.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/libdm-string.c b/libdm/libdm-string.c
index 8ad479c..bc41b70 100644
--- a/libdm/libdm-string.c
+++ b/libdm/libdm-string.c
@@ -122,7 +122,7 @@ int dm_snprintf(char *buf, size_t bufsize, const char *format, ...)
n = vsnprintf(buf, bufsize, format, ap);
va_end(ap);
- if (n < 0 || ((unsigned) n + 1 > bufsize))
+ if (n < 0 || ((unsigned) n >= bufsize))
return -1;
return n;
9 years, 8 months
master - display: add display_lvname
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e21d0eb90e9a84...
Commit: e21d0eb90e9a842ca5fd4d09c076f5fb894ba6ca
Parent: 6f6900d457afdf8533968f6cd639d4b14779ad51
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jul 2 00:01:46 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:42 2014 +0200
display: add display_lvname
Add simple function to print vg/lv name.
Useful i.e. in error messages.
---
lib/display/display.c | 9 +++++++++
lib/display/display.h | 2 ++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lib/display/display.c b/lib/display/display.c
index 9780f10..fd785ed 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -93,6 +93,15 @@ const char *get_percent_string(percent_type_t def)
return _percent_types[def];
}
+const char *display_lvname(const struct logical_volume *lv)
+{
+ char buf[NAME_LEN * 2 + 2];
+
+ (void) snprintf(buf, sizeof(buf), "%s/%s", lv->vg->name, lv->name);
+
+ return dm_pool_strdup(lv->vg->cmd->mem, buf) ? : lv->name; /* at least LV name... */
+}
+
#define BASE_UNKNOWN 0
#define BASE_SHARED 1
#define BASE_1024 8
diff --git a/lib/display/display.h b/lib/display/display.h
index d5c0efa..cc5654b 100644
--- a/lib/display/display.h
+++ b/lib/display/display.h
@@ -22,6 +22,8 @@
#include <stdint.h>
+const char *display_lvname(const struct logical_volume *lv);
+
/* Specify size in KB */
const char *display_size(const struct cmd_context *cmd, uint64_t size);
const char *display_size_long(const struct cmd_context *cmd, uint64_t size);
9 years, 8 months
master - fsadm: avoid using -a in test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6f6900d457afdf...
Commit: 6f6900d457afdf8533968f6cd639d4b14779ad51
Parent: 7bdf4719e8327a74262e47adfe78ad81a26ff4c0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jun 30 20:03:05 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:41 2014 +0200
fsadm: avoid using -a in test
---
scripts/fsadm.sh | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index e6fe7ce..f4ea796 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -276,7 +276,7 @@ try_umount() {
}
validate_parsing() {
- test -n "$BLOCKSIZE" -a -n "$BLOCKCOUNT" || error "Cannot parse $1 output"
+ test -n "$BLOCKSIZE" && test -n "$BLOCKCOUNT" || error "Cannot parse $1 output"
}
####################################
# Resize ext2/ext3/ext4 filesystem
@@ -459,12 +459,12 @@ trap "cleanup 2" 2
test -n "$FSADM_RUNNING" && exit 0
# test some prerequisities
-test -n "$TUNE_EXT" -a -n "$RESIZE_EXT" -a -n "$TUNE_REISER" -a -n "$RESIZE_REISER" \
- -a -n "$TUNE_XFS" -a -n "$RESIZE_XFS" -a -n "$MOUNT" -a -n "$UMOUNT" -a -n "$MKDIR" \
- -a -n "$RMDIR" -a -n "$BLOCKDEV" -a -n "$BLKID" -a -n "$GREP" -a -n "$READLINK" \
- -a -n "$DATE" -a -n "$FSCK" -a -n "$XFS_CHECK" -a -n "$XFS_REPAIR" \
- -a -n "$LVM" \
- || error "Required command definitions in the script are missing!"
+for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \
+ "$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \
+ "$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \
+ "$DATE" "$FSCK" "$XFS_CHECK" "$XFS_REPAIR" "$LVM" ; do
+ test -n "$i" || error "Required command definitions in the script are missing!"
+done
"$LVM" version >"$NULL" 2>&1 || error "Could not run lvm binary \"$LVM\""
$("$READLINK" -e / >"$NULL" 2>&1) || READLINK_E="-f"
9 years, 8 months
master - pool: delay conversion prompt
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7bdf4719e8327a...
Commit: 7bdf4719e8327a74262e47adfe78ad81a26ff4c0
Parent: 3af761ba167236a2d66f8687ade5db6311498d06
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 1 11:06:36 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:45:39 2014 +0200
pool: delay conversion prompt
First validate as much params as possible before prompting user
about conversion to data and metadata LV.
---
WHATS_NEW | 1 +
tools/lvconvert.c | 91 +++++++++++++++++++++++++++++------------------------
2 files changed, 51 insertions(+), 41 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 8934d6f..dfbb4e3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.108 -
=================================
+ Postpone thin pool lvconvert prompts (2.02.107).
Require --yes option to skip prompt to lvconvert thin pool chunksize.
Support lvremove -ff to remove thin volumes from broken thin pools.
Require --yes to skip raid repair prompt.
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index be2c916..ca58a1f 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2680,7 +2680,6 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
}
}
- data_lv = pool_lv;
if (lv_is_thin_type(pool_lv) && !lp->pool_metadata_lv_name) {
log_error("Can't use thin logical volume %s/%s for thin pool data.",
pool_lv->vg->name, pool_lv->name);
@@ -2707,17 +2706,6 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
pool_lv->vg->name, pool_lv->name);
return 0;
}
- } else {
- log_warn("WARNING: Converting \"%s/%s\" logical volume to pool's data volume.",
- pool_lv->vg->name, pool_lv->name);
- log_warn("THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)");
-
- if (!lp->yes &&
- yes_no_prompt("Do you really want to convert \"%s/%s\"? [y/n]: ",
- pool_lv->vg->name, pool_lv->name) == 'n') {
- log_error("Conversion aborted.");
- return 0;
- }
}
if ((dm_snprintf(metadata_name, sizeof(metadata_name), "%s%s",
@@ -2782,26 +2770,12 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
/* Swap normal LV with pool's metadata LV ? */
if (lv_is_thin_pool(pool_lv)) {
if (!deactivate_lv(cmd, metadata_lv)) {
- log_error("Aborting. Failed to deactivate thin metadata lv.");
- return 0;
- }
- if (!lp->yes &&
- yes_no_prompt("Do you want to swap metadata of %s/%s pool with "
- "volume %s/%s? [y/n]: ",
- pool_lv->vg->name, pool_lv->name,
- pool_lv->vg->name, metadata_lv->name) == 'n') {
- log_error("Conversion aborted.");
+ log_error("Aborting. Failed to deactivate LV %s/%s.",
+ metadata_lv->vg->name, metadata_lv->name);
return 0;
}
+
seg = first_seg(pool_lv);
- /* Swap names between old and new metadata LV */
- if (!detach_pool_metadata_lv(seg, &pool_metadata_lv))
- return_0;
- old_name = metadata_lv->name;
- if (!lv_rename_update(cmd, metadata_lv, "pvmove_tmeta", 0))
- return_0;
- if (!lv_rename_update(cmd, pool_metadata_lv, old_name, 0))
- return_0;
if (!arg_count(cmd, chunksize_ARG))
lp->chunk_size = seg->chunk_size;
@@ -2825,6 +2799,25 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
display_size(cmd, lp->chunk_size),
pool_lv->vg->name, pool_lv->name);
}
+
+ if (!lp->yes &&
+ yes_no_prompt("Do you want to swap metadata of %s/%s pool with "
+ "volume %s/%s? [y/n]: ",
+ pool_lv->vg->name, pool_lv->name,
+ metadata_lv->vg->name, metadata_lv->name) == 'n') {
+ log_error("Conversion aborted.");
+ return 0;
+ }
+
+ /* Swap names between old and new metadata LV */
+ if (!detach_pool_metadata_lv(seg, &pool_metadata_lv))
+ return_0;
+ old_name = metadata_lv->name;
+ if (!lv_rename_update(cmd, metadata_lv, "pvmove_tmeta", 0))
+ return_0;
+ if (!lv_rename_update(cmd, pool_metadata_lv, old_name, 0))
+ return_0;
+
if (!arg_count(cmd, discards_ARG))
lp->discards = seg->discards;
if (!arg_count(cmd, zero_ARG))
@@ -2834,18 +2827,8 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
}
if (!deactivate_lv(cmd, metadata_lv)) {
- log_error("Aborting. Failed to deactivate thin metadata lv.");
- return 0;
- }
-
- log_warn("WARNING: Converting \"%s/%s\" logical volume to pool's metadata volume.",
- metadata_lv->vg->name, metadata_lv->name);
- log_warn("THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)");
-
- if (!lp->yes &&
- yes_no_prompt("Do you really want to convert \"%s/%s\"? [y/n]: ",
- metadata_lv->vg->name, metadata_lv->name) == 'n') {
- log_error("Conversion aborted.");
+ log_error("Aborting. Failed to deactivate \"%s/%s\".",
+ metadata_lv->vg->name, metadata_lv->name);
return 0;
}
@@ -2867,9 +2850,21 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
display_size(cmd, min_metadata_size));
return 0;
}
+
if (!_lvconvert_update_pool_params(pool_lv, lp))
return_0;
+ log_warn("WARNING: Converting logical volume %s/%s to pool's metadata volume.",
+ metadata_lv->vg->name, metadata_lv->name);
+ log_warn("THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)");
+
+ if (!lp->yes &&
+ yes_no_prompt("Do you really want to convert %s/%s? [y/n]: ",
+ metadata_lv->vg->name, metadata_lv->name) == 'n') {
+ log_error("Conversion aborted.");
+ return 0;
+ }
+
metadata_lv->status |= LV_TEMPORARY;
if (!activate_lv_local(cmd, metadata_lv)) {
log_error("Aborting. Failed to activate metadata lv.");
@@ -2892,6 +2887,20 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
lp->pvh, lp->poolmetadataspare))
return_0;
+ if (!lv_is_thin_pool(pool_lv)) {
+ log_warn("WARNING: Converting logical volume %s/%s to pool's data volume.",
+ pool_lv->vg->name, pool_lv->name);
+ log_warn("THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)");
+
+ if (!lp->yes &&
+ yes_no_prompt("Do you really want to convert %s/%s? [y/n]: ",
+ pool_lv->vg->name, pool_lv->name) == 'n') {
+ log_error("Conversion aborted.");
+ return 0;
+ }
+ }
+
+ data_lv = pool_lv;
old_name = data_lv->name; /* Use for pool name */
/*
* Since we wish to have underlaying devs to match _[ct]data
9 years, 8 months
master - thin: fix chunk_size conversion prompt skip
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3af761ba167236...
Commit: 3af761ba167236a2d66f8687ade5db6311498d06
Parent: 93a80018ae8e2f3f56e56b42237779661c9040b3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 1 11:04:14 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jul 2 10:43:56 2014 +0200
thin: fix chunk_size conversion prompt skip
Use --force only enables prompting for dangerous operation.
User has to add --yes to skip this prompt.
---
WHATS_NEW | 1 +
tools/lvconvert.c | 27 +++++++++++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 230bdf0..8934d6f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.108 -
=================================
+ Require --yes option to skip prompt to lvconvert thin pool chunksize.
Support lvremove -ff to remove thin volumes from broken thin pools.
Require --yes to skip raid repair prompt.
Change makefile %.d generation to handle filename changes without make clean.
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index d80fa60..be2c916 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2805,14 +2805,25 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
if (!arg_count(cmd, chunksize_ARG))
lp->chunk_size = seg->chunk_size;
- else if ((lp->chunk_size != seg->chunk_size) &&
- !lp->force &&
- yes_no_prompt("Do you really want to change chunk size %s to %s for %s/%s "
- "pool volume? [y/n]: ", display_size(cmd, seg->chunk_size),
- display_size(cmd, lp->chunk_size),
- pool_lv->vg->name, pool_lv->name) == 'n') {
- log_error("Conversion aborted.");
- return 0;
+ else if (lp->chunk_size != seg->chunk_size) {
+ if (lp->force == PROMPT) {
+ log_error("Chunk size can be only changed with --force. Conversion aborted.");
+ return 0;
+ }
+ /* Ok, user has likely some serious reason for this */
+ if (!lp->yes &&
+ yes_no_prompt("Do you really want to change chunk size %s to %s "
+ "for %s/%s pool volume? [y/n]: ",
+ display_size(cmd, seg->chunk_size),
+ display_size(cmd, lp->chunk_size),
+ pool_lv->vg->name, pool_lv->name) == 'n') {
+ log_error("Conversion aborted.");
+ return 0;
+ }
+ log_warn("WARNING: Changing chunk size %s to %s for %s/%s pool volume.",
+ display_size(cmd, seg->chunk_size),
+ display_size(cmd, lp->chunk_size),
+ pool_lv->vg->name, pool_lv->name);
}
if (!arg_count(cmd, discards_ARG))
lp->discards = seg->discards;
9 years, 8 months