1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Free memory in _raw_read_mda_header() error paths.

Fix ambiguous vgsplit error message for split LV.
Fix lvextend man page typo.
This commit is contained in:
Alasdair Kergon 2007-01-09 21:12:41 +00:00
parent 33f732c5e9
commit e62436fc70
4 changed files with 16 additions and 10 deletions

View File

@ -1,5 +1,8 @@
Version 2.02.18 -
====================================
Free memory in _raw_read_mda_header() error paths.
Fix ambiguous vgsplit error message for split LV.
Fix lvextend man page typo.
Add configure --with-dmdir to compile against a device-mapper source tree.
Use no flush suspending for mirrors.
Add dmeventd_mirror register_mutex, tidy initialisation & add memlock.

View File

@ -132,37 +132,40 @@ static struct mda_header *_raw_read_mda_header(const struct format_type *fmt,
if (!dev_read(dev_area->dev, dev_area->start, MDA_HEADER_SIZE, mdah)) {
stack;
dm_pool_free(fmt->cmd->mem, mdah);
return NULL;
goto error;
}
if (mdah->checksum_xl != xlate32(calc_crc(INITIAL_CRC, mdah->magic,
MDA_HEADER_SIZE -
sizeof(mdah->checksum_xl)))) {
log_error("Incorrect metadata area header checksum");
return NULL;
goto error;
}
_xlate_mdah(mdah);
if (strncmp((char *)mdah->magic, FMTT_MAGIC, sizeof(mdah->magic))) {
log_error("Wrong magic number in metadata area header");
return NULL;
goto error;
}
if (mdah->version != FMTT_VERSION) {
log_error("Incompatible metadata area header version: %d",
mdah->version);
return NULL;
goto error;
}
if (mdah->start != dev_area->start) {
log_error("Incorrect start sector in metadata area header: %"
PRIu64, mdah->start);
return NULL;
goto error;
}
return mdah;
error:
dm_pool_free(fmt->cmd->mem, mdah);
return NULL;
}
static int _raw_write_mda_header(const struct format_type *fmt,

View File

@ -31,7 +31,7 @@ size of the Logical Volume with the suffix %LV or as a percentage of the remaini
free space in the Volume Group with the suffix %FREE.
.TP
.I \-L, \-\-size [+]LogicalVolumeSize[kKmMgGtTpPeE]
Extend or set the logical volume size in units in units of megabytes.
Extend or set the logical volume size in units of megabytes.
A size suffix of M for megabytes,
G for gigabytes, T for terabytes, P for petabytes
or E for exabytes is optional.

View File

@ -84,9 +84,9 @@ static int _move_lvs(struct volume_group *vg_from, struct volume_group *vg_to)
pv = seg_pv(seg, s);
if (vg_with) {
if (!pv_is_in_vg(vg_with, pv)) {
log_error("Logical Volume %s "
"split between "
"Volume Groups",
log_error("Can't split Logical "
"Volume %s between "
"two Volume Groups",
lv->name);
return 0;
}