mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
vdo: use only verbose log level for reformating
When lvcreate is makeing VDO pool and user has not specified -V size, ATM we actually run 'vdoformat' twice to get properly 'extent' aligned size matching lvm2 properties - so the 2nd. run of vdoformat actually can stay with 'log_verbose()' so the standard printed result is not showing confusing info (which is now also correctly using print_unless_silent)
This commit is contained in:
parent
d0697be500
commit
fc5bc5985d
@ -249,6 +249,7 @@ static int _format_vdo_pool_data_lv(struct logical_volume *data_lv,
|
|||||||
FILE *f;
|
FILE *f;
|
||||||
uint64_t lb;
|
uint64_t lb;
|
||||||
unsigned slabbits;
|
unsigned slabbits;
|
||||||
|
unsigned reformating = 0;
|
||||||
int args = 1;
|
int args = 1;
|
||||||
char buf_args[5][128];
|
char buf_args[5][128];
|
||||||
char buf[256]; /* buffer for short disk header (64B) */
|
char buf[256]; /* buffer for short disk header (64B) */
|
||||||
@ -351,8 +352,12 @@ reformat:
|
|||||||
}
|
}
|
||||||
if ((c = strchr(buf, '\n')))
|
if ((c = strchr(buf, '\n')))
|
||||||
*c = 0; /* cut last '\n' away */
|
*c = 0; /* cut last '\n' away */
|
||||||
if (buf[0])
|
if (buf[0]) {
|
||||||
log_print(" %s", buf); /* Print vdo_format messages */
|
if (reformating)
|
||||||
|
log_verbose(" %s", buf); /* Print vdo_format messages */
|
||||||
|
else
|
||||||
|
log_print_unless_silent(" %s", buf); /* Print vdo_format messages */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pipe_close(&pdata)) {
|
if (!pipe_close(&pdata)) {
|
||||||
@ -372,6 +377,7 @@ reformat:
|
|||||||
*logical_size = logical_size_aligned;
|
*logical_size = logical_size_aligned;
|
||||||
argv[1] = (char*) "--force";
|
argv[1] = (char*) "--force";
|
||||||
args = 2;
|
args = 2;
|
||||||
|
reformating = 1;
|
||||||
log_verbose("Reformating VDO to align virtual size %s by extent size.",
|
log_verbose("Reformating VDO to align virtual size %s by extent size.",
|
||||||
display_size(data_lv->vg->cmd, *logical_size));
|
display_size(data_lv->vg->cmd, *logical_size));
|
||||||
goto reformat;
|
goto reformat;
|
||||||
|
Loading…
Reference in New Issue
Block a user