1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Fix snapshot device size bug (since 2.01.01).

This commit is contained in:
Alasdair Kergon 2005-01-27 15:48:49 +00:00
parent 9549da2743
commit 7851b13bc4
3 changed files with 4 additions and 8 deletions

View File

@ -1,5 +1,6 @@
Version 2.01.03 - Version 2.01.03 -
=================================== ===================================
Fix snapshot device size bug (since 2.01.01).
clvmd announces startup and cluster connection in syslog. clvmd announces startup and cluster connection in syslog.
Gulm clvmd doesn't hang trying to talk to a rebooted node. Gulm clvmd doesn't hang trying to talk to a rebooted node.
Gulm clvmd doesn't print cman error on startup. Gulm clvmd doesn't print cman error on startup.

View File

@ -31,7 +31,7 @@ static const char *_name(const struct lv_segment *seg)
static int _text_import(struct lv_segment *seg, const struct config_node *sn, static int _text_import(struct lv_segment *seg, const struct config_node *sn,
struct hash_table *pv_hash) struct hash_table *pv_hash)
{ {
uint32_t chunk_size, extent_count; uint32_t chunk_size;
const char *org_name, *cow_name; const char *org_name, *cow_name;
struct logical_volume *org, *cow; struct logical_volume *org, *cow;
@ -70,10 +70,7 @@ static int _text_import(struct lv_segment *seg, const struct config_node *sn,
return 0; return 0;
} }
if (!get_config_uint32(sn, "extent_count", &extent_count)) if (!vg_add_snapshot(org, cow, 1, &seg->lv->lvid.id[1], seg->len,
extent_count = org->le_count;
if (!vg_add_snapshot(org, cow, 1, &seg->lv->lvid.id[1], extent_count,
chunk_size)) { chunk_size)) {
stack; stack;
return 0; return 0;
@ -85,8 +82,6 @@ static int _text_import(struct lv_segment *seg, const struct config_node *sn,
static int _text_export(const struct lv_segment *seg, struct formatter *f) static int _text_export(const struct lv_segment *seg, struct formatter *f)
{ {
outf(f, "chunk_size = %u", seg->chunk_size); outf(f, "chunk_size = %u", seg->chunk_size);
if (seg->len != seg->origin->le_count)
outf(f, "extent_count = %u", seg->len);
outf(f, "origin = \"%s\"", seg->origin->name); outf(f, "origin = \"%s\"", seg->origin->name);
outf(f, "cow_store = \"%s\"", seg->cow->name); outf(f, "cow_store = \"%s\"", seg->cow->name);

View File

@ -609,7 +609,7 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
return 0; return 0;
} }
if (!vg_add_snapshot(org, lv, 1, NULL, lv->le_count, if (!vg_add_snapshot(org, lv, 1, NULL, org->le_count,
lp->chunk_size)) { lp->chunk_size)) {
log_err("Couldn't create snapshot."); log_err("Couldn't create snapshot.");
return 0; return 0;