diff --git a/VERSION b/VERSION index 6134f63d7..1fc2f9be2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.02.30-cvs (2008-01-17) +2.02.31-cvs (2008-01-17) diff --git a/WHATS_NEW b/WHATS_NEW index f34ff3372..7a74fe2d1 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,3 +1,7 @@ +Version 2.02.31 - +=================================== + Avoid error message when using default setting of lvcreate -M1. (2.02.30) + Version 2.02.30 - 17th January 2008 =================================== Set default readahead to twice maximium stripe size. diff --git a/tools/lvcreate.c b/tools/lvcreate.c index b5280b016..0c8a421a5 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -463,16 +463,14 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd, /* * Read ahead. */ - if (arg_count(cmd, readahead_ARG)) { - lp->read_ahead = arg_uint_value(cmd, readahead_ARG, 0); - pagesize = lvm_getpagesize() >> SECTOR_SHIFT; - 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); - } + lp->read_ahead = arg_uint_value(cmd, readahead_ARG, DM_READ_AHEAD_NONE); + pagesize = lvm_getpagesize() >> SECTOR_SHIFT; + 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); } /* @@ -547,6 +545,7 @@ static int _lvcreate(struct cmd_context *cmd, struct volume_group *vg, } if (lp->read_ahead != DM_READ_AHEAD_AUTO && + lp->read_ahead != DM_READ_AHEAD_NONE && (vg->fid->fmt->features & FMT_RESTRICTED_READAHEAD) && (lp->read_ahead < 2 || lp->read_ahead > 120)) { log_error("Metadata only supports readahead values between 2 and 120.");