1
0
mirror of git://sourceware.org/git/lvm2.git synced 2026-02-09 04:32:44 +03:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Alasdair Kergon
5be987b40f pre-release
N.B. This is a big release and some regressions are inevitable.
2007-12-05 22:19:24 +00:00
Alasdair Kergon
066bc35e69 export can_split parameter until rest of pvmove allocation restructuring gets done 2007-12-05 22:11:20 +00:00
Alasdair Kergon
403779437c round readahead to multiple of page size in tools 2007-12-05 19:24:32 +00:00
Alasdair Kergon
fb806f61d4 Fix minimum readahead debug message. 2007-12-05 18:57:34 +00:00
Alasdair Kergon
6ce306661c post-release 2007-12-05 17:14:30 +00:00
14 changed files with 57 additions and 22 deletions

View File

@@ -1 +1 @@
2.02.29-cvs (2007-08-24)
2.02.29-cvs (2007-12-05)

View File

@@ -1,5 +1,5 @@
Version 2.02.29 -
==================================
Version 2.02.29 - 5th December 2007
===================================
Make clvmd backup vg metadata on remote nodes.
Refactor pvmove allocation code.
Decode cluster locking state in log message.
@@ -36,14 +36,16 @@ Version 2.02.29 -
Add const attributes to pv accessor functions.
Refactor vg_add_snapshot() and lv_create_empty().
Handle new sysfs subsystem/block/devices directory structure.
Tests are run with LVM_SYSTEM_DIR pointing to private root and /dev dirs.
Run test with LVM_SYSTEM_DIR pointing to private root and /dev dirs.
Fix a bug in lvm_dump.sh checks for lvm/dmsetup binaries.
Fix underquotations in lvm_dump.sh.
Refactor lvcreate stripe and mirror parameter validation.
All tools: print --help output to stdout, not stderr.
After a diagnostic, suggest --help, rather than printing all --help output.
Print --help output to stdout, not stderr.
After a cmdline processing error, don't print help text but suggest --help.
Add %PVS extents option to lvresize, lvextend, and lvcreate.
Add 'make check' to run tests in new subdirectory 'test'.
Moved the obsolete test subdirectory to old-tests.
Cope with relative paths in configure --with-dmdir.
Remove no-longer-correct restrictions on PV arg count with stripes/mirrors.
Fix strdup memory leak in str_list_dup().
Link with -lpthread when static SELinux libraries require that.

View File

@@ -1,3 +1,7 @@
Version 1.02.24 -
===================================
Fix minimum readahead debug message.
Version 1.02.23 - 5th December 2007
===================================
Update dm-ioctl.h after removal of compat code.

View File

@@ -1,6 +1,6 @@
##
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
## Copyright (C) 2004, 2007 Red Hat, Inc. All rights reserved.
## Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
##
## This file is part of LVM2.
##

View File

@@ -952,10 +952,10 @@ static int _add_new_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
max_stripe_size = seg->stripe_size;
}
if (read_ahead == DM_READ_AHEAD_AUTO)
if (read_ahead == DM_READ_AHEAD_AUTO) {
read_ahead = max_stripe_size;
else
read_ahead_flags = DM_READ_AHEAD_MINIMUM_FLAG;
}
dm_tree_node_set_read_ahead(dnode, read_ahead, read_ahead_flags);

View File

@@ -50,6 +50,7 @@ struct alloc_handle *allocate_extents(struct volume_group *vg,
uint32_t extents,
struct list *allocatable_pvs,
alloc_policy_t alloc,
unsigned can_split,
struct list *parallel_areas);
int lv_add_segment(struct alloc_handle *ah,

View File

@@ -1055,13 +1055,13 @@ static int _allocate(struct alloc_handle *ah,
struct volume_group *vg,
struct logical_volume *lv,
uint32_t new_extents,
unsigned can_split,
struct list *allocatable_pvs)
{
struct pv_area **areas;
uint32_t allocated = lv ? lv->le_count : 0;
uint32_t old_allocated;
struct lv_segment *prev_lvseg = NULL;
unsigned can_split = 1; /* Are we allowed more than one segment? */
int r = 0;
struct list *pvms;
uint32_t areas_size;
@@ -1180,6 +1180,7 @@ struct alloc_handle *allocate_extents(struct volume_group *vg,
uint32_t extents,
struct list *allocatable_pvs,
alloc_policy_t alloc,
unsigned can_split,
struct list *parallel_areas)
{
struct alloc_handle *ah;
@@ -1208,7 +1209,7 @@ struct alloc_handle *allocate_extents(struct volume_group *vg,
if (!segtype_is_virtual(segtype) &&
!_allocate(ah, vg, lv, (lv ? lv->le_count : 0) + extents,
allocatable_pvs)) {
can_split, allocatable_pvs)) {
stack;
alloc_destroy(ah);
return NULL;
@@ -1403,16 +1404,18 @@ int lv_extend(struct logical_volume *lv,
uint32_t m;
struct alloc_handle *ah;
struct lv_segment *seg;
unsigned can_split = 1;
if (segtype_is_virtual(segtype))
return lv_add_virtual_segment(lv, status, extents, segtype);
/* FIXME Temporary restriction during code reorganisation */
if (mirrored_pv)
alloc = ALLOC_CONTIGUOUS;
can_split = 0;
if (!(ah = allocate_extents(lv->vg, lv, segtype, stripes, mirrors, 0,
extents, allocatable_pvs, alloc, NULL)))
extents, allocatable_pvs, alloc, can_split,
NULL)))
return_0;
if (mirrors < 2) {

View File

@@ -438,8 +438,8 @@ static int _set_dev_node_read_ahead(const char *dev_name, uint32_t read_ahead,
return_0;
if (current_read_ahead > read_ahead) {
log_debug("%s: read ahead %" PRIu32
" below minimum of %" PRIu32,
log_debug("%s: retaining kernel read ahead of %" PRIu32
" (requested %" PRIu32 ")",
dev_name, current_read_ahead, read_ahead);
return 1;
}

View File

@@ -75,11 +75,10 @@ Change access permission to read-only or read/write.
.I \-r, \-\-readahead ReadAheadSectors|auto|none
Set read ahead sector count of this logical volume.
For volume groups with metadata in lvm1 format, this must
be a value between 2 and 120.
be a value between 2 and 120 sectors.
The default value is "auto" which allows the kernel to choose
a suitable value automatically.
"None" is equivalent to specifying zero.
N.B. This setting is currently disregarded and "auto" is always used.
.TP
.I \-\-refresh
If the logical volume is active, reload its metadata.

View File

@@ -125,7 +125,6 @@ be a value between 2 and 120.
The default value is "auto" which allows the kernel to choose
a suitable value automatically.
"None" is equivalent to specifying zero.
N.B. This setting is currently disregarded and "auto" is always used.
.TP
.I \-R, \-\-regionsize MirrorLogRegionSize
A mirror is divided into regions of this size (in MB), and the mirror log

View File

@@ -372,6 +372,7 @@ static int lvchange_readahead(struct cmd_context *cmd,
struct logical_volume *lv)
{
unsigned read_ahead = 0;
unsigned pagesize = (unsigned) lvm_getpagesize() >> SECTOR_SHIFT;
read_ahead = arg_uint_value(cmd, readahead_ARG, 0);
@@ -382,6 +383,13 @@ static int lvchange_readahead(struct cmd_context *cmd,
return 0;
}
if (read_ahead != DM_READ_AHEAD_AUTO &&
read_ahead != DM_READ_AHEAD_NONE && read_ahead % pagesize) {
read_ahead = (read_ahead / pagesize) * pagesize;
log_verbose("Rounding down readahead to %u sectors, a multiple "
"of page size %u.", read_ahead, pagesize);
}
if (lv->read_ahead == read_ahead) {
log_error("Read ahead is already %u for \"%s\"",
read_ahead, lv->name);

View File

@@ -339,7 +339,7 @@ static int lvconvert_mirrors(struct cmd_context * cmd, struct logical_volume * l
1, lp->mirrors - 1,
corelog ? 0U : 1U,
lv->le_count, lp->pvh, lp->alloc,
parallel_areas)))
1, parallel_areas)))
return_0;
lp->region_size = adjusted_mirror_region_size(lv->vg->extent_size,
@@ -385,7 +385,7 @@ static int lvconvert_mirrors(struct cmd_context * cmd, struct logical_volume * l
if (!(ah = allocate_extents(lv->vg, NULL, lp->segtype, 0,
0, 1, 0, lp->pvh, lp->alloc,
parallel_areas))) {
1, parallel_areas))) {
stack;
return 0;
}

View File

@@ -333,6 +333,7 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
int argc, char **argv)
{
int contiguous;
unsigned pagesize;
memset(lp, 0, sizeof(*lp));
@@ -462,8 +463,17 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
/*
* Read ahead.
*/
if (arg_count(cmd, readahead_ARG))
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);
}
}
/*
* Permissions.
@@ -740,7 +750,7 @@ static int _lvcreate(struct cmd_context *cmd, struct volume_group *vg,
if (!(ah = allocate_extents(vg, NULL, lp->segtype, lp->stripes,
lp->mirrors, lp->corelog ? 0U : 1U,
lp->extents, pvh, lp->alloc, NULL)))
lp->extents, pvh, lp->alloc, 1, NULL)))
return_0;
lp->region_size = adjusted_mirror_region_size(vg->extent_size,

View File

@@ -161,6 +161,11 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
log_print("Skipping locked LV %s", lv->name);
continue;
}
/* FIXME Just insert the layer below - no allocation */
// This knows nothing about pvmove
// insert_layer_for_segments_on_pv(cmd, lv, source_pvl, lv_mirr, *lvs_changed)
// - for each lv segment using that pv
// - call new fn insert_internal_layer()
if (!insert_pvmove_mirrors(cmd, lv_mirr, source_pvl, lv,
allocatable_pvs, alloc,
*lvs_changed)) {
@@ -175,6 +180,10 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
return NULL;
}
/* FIXME Do allocation and convert to mirror */
// again, this knows nothing about pvmove: it's a normal lvconvert lv_mirr to mirror with in-core log
// - a flag passed in requires that parent segs get split after the allocation (with failure if not possible)
return lv_mirr;
}