mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +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)))
|
||||
return_0;
|
||||
|
||||
if (lp->read_ahead) {
|
||||
if (lp->read_ahead != lv->read_ahead) {
|
||||
log_verbose("Setting read ahead sectors");
|
||||
lv->read_ahead = lp->read_ahead;
|
||||
}
|
||||
|
@ -509,7 +509,8 @@ static int _lvcreate_params(struct lvcreate_params *lp,
|
||||
/*
|
||||
* 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;
|
||||
if (lp->read_ahead != DM_READ_AHEAD_AUTO &&
|
||||
lp->read_ahead != DM_READ_AHEAD_NONE &&
|
||||
|
Loading…
Reference in New Issue
Block a user