mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix snapshot device size bug (since 2.01.01).
This commit is contained in:
parent
9549da2743
commit
7851b13bc4
@ -1,5 +1,6 @@
|
||||
Version 2.01.03 -
|
||||
===================================
|
||||
Fix snapshot device size bug (since 2.01.01).
|
||||
clvmd announces startup and cluster connection in syslog.
|
||||
Gulm clvmd doesn't hang trying to talk to a rebooted node.
|
||||
Gulm clvmd doesn't print cman error on startup.
|
||||
|
@ -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,
|
||||
struct hash_table *pv_hash)
|
||||
{
|
||||
uint32_t chunk_size, extent_count;
|
||||
uint32_t chunk_size;
|
||||
const char *org_name, *cow_name;
|
||||
struct logical_volume *org, *cow;
|
||||
|
||||
@ -70,10 +70,7 @@ static int _text_import(struct lv_segment *seg, const struct config_node *sn,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!get_config_uint32(sn, "extent_count", &extent_count))
|
||||
extent_count = org->le_count;
|
||||
|
||||
if (!vg_add_snapshot(org, cow, 1, &seg->lv->lvid.id[1], extent_count,
|
||||
if (!vg_add_snapshot(org, cow, 1, &seg->lv->lvid.id[1], seg->len,
|
||||
chunk_size)) {
|
||||
stack;
|
||||
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)
|
||||
{
|
||||
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, "cow_store = \"%s\"", seg->cow->name);
|
||||
|
||||
|
@ -609,7 +609,7 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
|
||||
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)) {
|
||||
log_err("Couldn't create snapshot.");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user