Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=56779c32c500426d…
Commit: 56779c32c500426db33d0e6032160ef4f5e0bbcc
Parent: 99f04835802ee675242a4896697eb784717ee998
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 29 21:17:15 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 30 17:26:20 2013 +0200
snapshot: fix resize of 100% full cow
When the COW area is using all the available space (100%) it can be still
a valid snapshot which may need a resize. So support it.
---
WHATS_NEW | 1 +
tools/lvresize.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 86357fd..1888c62 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
+ Fix lvresize --use-policies of VALID but 100% full snapshot.
Do not accept size parameters bigger then 16EiB.
Fix release of PV's fid in free_pv_fid().
Skip monitoring of snapshots that are already bigger then origin.
diff --git a/tools/lvresize.c b/tools/lvresize.c
index b679bf9..b1008ec 100644
--- a/tools/lvresize.c
+++ b/tools/lvresize.c
@@ -321,7 +321,7 @@ static int _adjust_policy_params(struct cmd_context *cmd,
} else {
if (!lv_snapshot_percent(lv, &percent))
return_0;
- if (!(PERCENT_0 < percent && percent < PERCENT_100) || percent <= policy_threshold)
+ if (!(PERCENT_0 < percent && percent <= PERCENT_100) || percent <= policy_threshold)
return 1; /* nothing to do */
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2f1a571c9707d596…
Commit: 2f1a571c9707d596d7716cec9488e54ba4c0c946
Parent: 55f42944bd76ffdf3f77331c491e7de24ed56a2f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 29 12:42:09 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu May 30 16:52:39 2013 +0200
fid: fix reset of PV fid
Avoid hitting memory corruption (double free) in code path,
where PV FID has been already destroyed and the released pointer
was left in PV structure and could have been tried to be released
from there 2nd. time with final context destruction.
---
WHATS_NEW | 1 +
lib/metadata/metadata.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 40fd569..f5adc0b 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
+ Fix release of PV's fid in free_pv_fid().
Skip monitoring of snapshots that are already bigger then origin.
Add lv_is_cow_covering_origin() to check if cow covers origin size.
Use libdm dm_get_status_snapshot() to parse snapshot status.
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 351d157..62b5c3f 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -3402,8 +3402,7 @@ void free_pv_fid(struct physical_volume *pv)
if (!pv)
return;
- if (pv->fid)
- pv->fid->fmt->ops->destroy_instance(pv->fid);
+ pv_set_fid(pv, NULL);
}
/* This is only called by lv_from_lvid, which is only called from
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5e7cdd60f0043d54…
Commit: 5e7cdd60f0043d54651a8441803daaea345897f1
Parent: 798ed9ea1c72b24a02d38106ecaea9379a673c6f
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu May 30 11:45:44 2013 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu May 30 11:45:44 2013 +0200
man: ea_start/ea_size -> ba_start/ba_size
---
man/pvcreate.8.in | 2 +-
man/pvs.8.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
index c3a652c..bd979aa 100644
--- a/man/pvcreate.8.in
+++ b/man/pvcreate.8.in
@@ -174,7 +174,7 @@ The start of the bootloader area is always aligned, see also \fB--dataalignment\
and \fB--dataalignmentoffset\fP. The bootloader area size may eventually
end up increased due to the alignment, but it's never less than the
size that is requested. To see the bootloader area start and size of
-an existing Physical Volume use \fBpvs -o +ea_start,ea_size\fP.
+an existing Physical Volume use \fBpvs -o +ba_start,ba_size\fP.
.TP
.B \-\-setphysicalvolumesize \fIsize
Overrides the automatically-detected size of the PV. Use with care.
diff --git a/man/pvs.8.in b/man/pvs.8.in
index 7fff4fd..7ec724a 100644
--- a/man/pvs.8.in
+++ b/man/pvs.8.in
@@ -63,7 +63,7 @@ and \fB-o pvseg_all\fP to select all Physical Volume segment columns.
Use \fB-o help\fP to view the full list of columns available.
.IP
Column names include: pv_fmt, pv_uuid, dev_size, pv_name, pv_mda_free,
-pv_mda_size, ea_start, ea_size, pe_start, pv_size, pv_free, pv_used,
+pv_mda_size, ba_start, ba_size, pe_start, pv_size, pv_free, pv_used,
pv_attr, pv_pe_count, pv_pe_alloc_count, pv_tags, pv_mda_count,
pv_mda_used_count, pvseg_start, and pvseg_size
.IP