mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-23 21:35:29 +03:00
Fix the same readahead rounding in lvcreate.
(fixes previous commit)
This commit is contained in:
parent
42e922d587
commit
350d0a6495
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user