1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Round readahead more inteligently and print warning.

Round readahead at least to one page up.
Print warning instead of verbose message.
This commit is contained in:
Milan Broz 2009-06-06 22:00:20 +00:00
parent 2d37634918
commit 12b1f31cbb
2 changed files with 7 additions and 3 deletions

View File

@ -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.

View File

@ -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) {