1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix the same readahead rounding in lvcreate.

(fixes previous commit)
This commit is contained in:
Milan Broz 2009-06-06 22:06:54 +00:00
parent 12b1f31cbb
commit b4a2de670a

View File

@ -477,9 +477,12 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
if (lp->read_ahead != DM_READ_AHEAD_AUTO &&
lp->read_ahead != DM_READ_AHEAD_NONE &&
lp->read_ahead % pagesize) {
lp->read_ahead = (lp->read_ahead / pagesize) * pagesize;
log_verbose("Rounding down readahead to %u sectors, a multiple "
"of page size %u.", lp->read_ahead, pagesize);
if (lp->read_ahead < pagesize)
lp->read_ahead = pagesize;
else
lp->read_ahead = (lp->read_ahead / pagesize) * pagesize;
log_warn("WARNING: Overriding readahead to %u sectors, a multiple "
"of %uK page size.", lp->read_ahead, pagesize >> 1);
}
/*