mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Fix the same readahead rounding in lvcreate.
(fixes previous commit)
This commit is contained in:
parent
12b1f31cbb
commit
b4a2de670a
@ -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