mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cleanup: shorter code
This commit is contained in:
parent
1b439a0b8e
commit
ce7f06cf4e
@ -577,7 +577,7 @@ static int _read_activation_params(struct cmd_context *cmd,
|
|||||||
struct volume_group *vg,
|
struct volume_group *vg,
|
||||||
struct lvcreate_params *lp)
|
struct lvcreate_params *lp)
|
||||||
{
|
{
|
||||||
unsigned pagesize;
|
unsigned pagesize = lvm_getpagesize() >> SECTOR_SHIFT;
|
||||||
|
|
||||||
lp->activate = (activation_change_t)
|
lp->activate = (activation_change_t)
|
||||||
arg_uint_value(cmd, activate_ARG, CHANGE_AY);
|
arg_uint_value(cmd, activate_ARG, CHANGE_AY);
|
||||||
@ -585,7 +585,6 @@ static int _read_activation_params(struct cmd_context *cmd,
|
|||||||
/* Read ahead */
|
/* Read ahead */
|
||||||
lp->read_ahead = arg_uint_value(cmd, readahead_ARG,
|
lp->read_ahead = arg_uint_value(cmd, readahead_ARG,
|
||||||
cmd->default_settings.read_ahead);
|
cmd->default_settings.read_ahead);
|
||||||
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 &&
|
||||||
lp->read_ahead % pagesize) {
|
lp->read_ahead % pagesize) {
|
||||||
|
Loading…
Reference in New Issue
Block a user