diff --git a/WHATS_NEW b/WHATS_NEW index b4243663c..e74549696 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.48 - =============================== + Round up requested readahead to at least one page and print warning. Try to repair vg before actual vgremove when force flag provided. Fix possible double release of VG after recovery. Add parameter to process_each_vg specifying what to do with inconsistent VG. diff --git a/tools/lvchange.c b/tools/lvchange.c index 10795e3bb..5abb6e543 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -370,9 +370,12 @@ static int lvchange_readahead(struct cmd_context *cmd, if (read_ahead != DM_READ_AHEAD_AUTO && read_ahead != DM_READ_AHEAD_NONE && read_ahead % pagesize) { - read_ahead = (read_ahead / pagesize) * pagesize; - log_verbose("Rounding down readahead to %u sectors, a multiple " - "of page size %u.", read_ahead, pagesize); + if (read_ahead < pagesize) + read_ahead = pagesize; + else + read_ahead = (read_ahead / pagesize) * pagesize; + log_warn("WARNING: Overriding readahead to %u sectors, a multiple " + "of %uK page size.", read_ahead, pagesize >> 1); } if (lv->read_ahead == read_ahead) {