mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-20 18:09:23 +03:00
Fix setting of readahead in lvcreate.
The default comes from the configuration settings, with possible commandline override.
This commit is contained in:
parent
0548bcc2dc
commit
c053fb62bc
@ -3019,7 +3019,7 @@ int lv_create_single(struct volume_group *vg,
|
|||||||
status, lp->alloc, vg)))
|
status, lp->alloc, vg)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (lp->read_ahead) {
|
if (lp->read_ahead != lv->read_ahead) {
|
||||||
log_verbose("Setting read ahead sectors");
|
log_verbose("Setting read ahead sectors");
|
||||||
lv->read_ahead = lp->read_ahead;
|
lv->read_ahead = lp->read_ahead;
|
||||||
}
|
}
|
||||||
|
@ -509,7 +509,8 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
|||||||
/*
|
/*
|
||||||
* Read ahead.
|
* Read ahead.
|
||||||
*/
|
*/
|
||||||
lp->read_ahead = arg_uint_value(cmd, readahead_ARG, DM_READ_AHEAD_NONE);
|
lp->read_ahead = arg_uint_value(cmd, readahead_ARG,
|
||||||
|
cmd->default_settings.read_ahead);
|
||||||
pagesize = lvm_getpagesize() >> SECTOR_SHIFT;
|
pagesize = lvm_getpagesize() >> SECTOR_SHIFT;
|
||||||
if (lp->read_ahead != DM_READ_AHEAD_AUTO &&
|
if (lp->read_ahead != DM_READ_AHEAD_AUTO &&
|
||||||
lp->read_ahead != DM_READ_AHEAD_NONE &&
|
lp->read_ahead != DM_READ_AHEAD_NONE &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user