master - cleanup: use _ prefix for static functions
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5cd3b5c0cf562e...
Commit: 5cd3b5c0cf562edc3ec2d860b4d51313525e4130
Parent: 3e4a21427bdba7d6cfc9083e8c3736707ab31cc0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 18 17:34:01 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
cleanup: use _ prefix for static functions
---
lib/filters/filter-mpath.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c
index 902cc25..468dc6c 100644
--- a/lib/filters/filter-mpath.c
+++ b/lib/filters/filter-mpath.c
@@ -22,7 +22,7 @@
#define MPATH_PREFIX "mpath-"
-static const char *get_sysfs_name(struct device *dev)
+static const char *_get_sysfs_name(struct device *dev)
{
const char *name;
@@ -40,7 +40,7 @@ static const char *get_sysfs_name(struct device *dev)
return name;
}
-static const char *get_sysfs_name_by_devt(const char *sysfs_dir, dev_t devno,
+static const char *_get_sysfs_name_by_devt(const char *sysfs_dir, dev_t devno,
char *buf, size_t buf_size)
{
const char *name;
@@ -68,7 +68,7 @@ static const char *get_sysfs_name_by_devt(const char *sysfs_dir, dev_t devno,
return name;
}
-static int get_sysfs_string(const char *path, char *buffer, int max_size)
+static int _get_sysfs_string(const char *path, char *buffer, int max_size)
{
FILE *fp;
int r = 0;
@@ -89,7 +89,7 @@ static int get_sysfs_string(const char *path, char *buffer, int max_size)
return r;
}
-static int get_sysfs_get_major_minor(const char *sysfs_dir, const char *kname, int *major, int *minor)
+static int _get_sysfs_get_major_minor(const char *sysfs_dir, const char *kname, int *major, int *minor)
{
char path[PATH_MAX], buffer[64];
@@ -98,7 +98,7 @@ static int get_sysfs_get_major_minor(const char *sysfs_dir, const char *kname, i
return 0;
}
- if (!get_sysfs_string(path, buffer, sizeof(buffer)))
+ if (!_get_sysfs_string(path, buffer, sizeof(buffer)))
return_0;
if (sscanf(buffer, "%d:%d", major, minor) != 2) {
@@ -109,7 +109,7 @@ static int get_sysfs_get_major_minor(const char *sysfs_dir, const char *kname, i
return 1;
}
-static int get_parent_mpath(const char *dir, char *name, int max_size)
+static int _get_parent_mpath(const char *dir, char *name, int max_size)
{
struct dirent *d;
DIR *dr;
@@ -141,7 +141,7 @@ static int get_parent_mpath(const char *dir, char *name, int max_size)
return r;
}
-static int dev_is_mpath(struct dev_filter *f, struct device *dev)
+static int _dev_is_mpath(struct dev_filter *f, struct device *dev)
{
struct dev_types *dt = (struct dev_types *) f->private;
const char *part_name, *name;
@@ -160,14 +160,14 @@ static int dev_is_mpath(struct dev_filter *f, struct device *dev)
switch (dev_get_primary_dev(dt, dev, &primary_dev)) {
case 2: /* The dev is partition. */
part_name = dev_name(dev); /* name of original dev for log_debug msg */
- if (!(name = get_sysfs_name_by_devt(sysfs_dir, primary_dev, parent_name, sizeof(parent_name))))
+ if (!(name = _get_sysfs_name_by_devt(sysfs_dir, primary_dev, parent_name, sizeof(parent_name))))
return_0;
log_debug_devs("%s: Device is a partition, using primary "
"device %s for mpath component detection",
part_name, name);
break;
case 1: /* The dev is already a primary dev. Just continue with the dev. */
- if (!(name = get_sysfs_name(dev)))
+ if (!(name = _get_sysfs_name(dev)))
return_0;
break;
default: /* 0, error. */
@@ -189,10 +189,10 @@ static int dev_is_mpath(struct dev_filter *f, struct device *dev)
return 0;
}
- if (!get_parent_mpath(path, parent_name, PATH_MAX))
+ if (!_get_parent_mpath(path, parent_name, sizeof(parent_name)))
return 0;
- if (!get_sysfs_get_major_minor(sysfs_dir, parent_name, &major, &minor))
+ if (!_get_sysfs_get_major_minor(sysfs_dir, parent_name, &major, &minor))
return_0;
if (major != dt->device_mapper_major)
@@ -203,7 +203,7 @@ static int dev_is_mpath(struct dev_filter *f, struct device *dev)
static int _ignore_mpath(struct dev_filter *f, struct device *dev)
{
- if (dev_is_mpath(f, dev) == 1) {
+ if (_dev_is_mpath(f, dev) == 1) {
log_debug_devs("%s: Skipping mpath component device", dev_name(dev));
return 0;
}
9 years, 8 months
master - cleanup: reindent and make obvious error path
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3e4a21427bdba7...
Commit: 3e4a21427bdba7d6cfc9083e8c3736707ab31cc0
Parent: 10e2370d2efc501067702ffd5cd86940c3637e1c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Aug 18 22:04:39 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
cleanup: reindent and make obvious error path
---
lib/filters/filter-mpath.c | 34 +++++++++++++++-------------------
1 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c
index a933ba1..902cc25 100644
--- a/lib/filters/filter-mpath.c
+++ b/lib/filters/filter-mpath.c
@@ -158,25 +158,21 @@ static int dev_is_mpath(struct dev_filter *f, struct device *dev)
return 0;
switch (dev_get_primary_dev(dt, dev, &primary_dev)) {
- default:
- case 0:
- /* Error. */
- log_error("Failed to get primary device for %d:%d.", major, minor);
- return 0;
- case 1:
- /* The dev is already a primary dev. Just continue with the dev. */
- if (!(name = get_sysfs_name(dev)))
- return_0;
- break;
- case 2:
- /* The dev is partition. */
- part_name = dev_name(dev); /* name of original dev for log_debug msg */
- if (!(name = get_sysfs_name_by_devt(sysfs_dir, primary_dev, parent_name, PATH_MAX)))
- return_0;
- log_debug_devs("%s: Device is a partition, using primary "
- "device %s for mpath component detection",
- part_name, name);
- break;
+ case 2: /* The dev is partition. */
+ part_name = dev_name(dev); /* name of original dev for log_debug msg */
+ if (!(name = get_sysfs_name_by_devt(sysfs_dir, primary_dev, parent_name, sizeof(parent_name))))
+ return_0;
+ log_debug_devs("%s: Device is a partition, using primary "
+ "device %s for mpath component detection",
+ part_name, name);
+ break;
+ case 1: /* The dev is already a primary dev. Just continue with the dev. */
+ if (!(name = get_sysfs_name(dev)))
+ return_0;
+ break;
+ default: /* 0, error. */
+ log_error("Failed to get primary device for %d:%d.", major, minor);
+ return 0;
}
if (dm_snprintf(path, PATH_MAX, "%s/block/%s/holders", sysfs_dir, name) < 0) {
9 years, 8 months
master - libdm: check version prints error
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=10e2370d2efc50...
Commit: 10e2370d2efc501067702ffd5cd86940c3637e1c
Parent: dec39b1a5f0f599fd751bc6cea8caaac8a211d31
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 19 14:22:22 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
libdm: check version prints error
Move 'bad' label above log_error, so the
error message is printed on 'bad' path.
(And return 0 is not without log_error()).
---
libdm/ioctl/libdm-iface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index 4f55ddf..7d50f3a 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -544,10 +544,10 @@ int dm_check_version(void)
dm_get_library_version(libversion, sizeof(libversion));
+ bad:
log_error("Incompatible libdevmapper %s%s and kernel driver %s",
libversion, compat, dmversion);
- bad:
_version_ok = 0;
return 0;
}
9 years, 8 months
master - lv_manip: check for str_list_dup failure
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dec39b1a5f0f59...
Commit: dec39b1a5f0f599fd751bc6cea8caaac8a211d31
Parent: cdb16a603954a1a3771644a101d0b372f8e0826c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 19 14:27:03 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
lv_manip: check for str_list_dup failure
---
lib/metadata/lv_manip.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index c314377..db70818 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -470,8 +470,9 @@ int lv_layout_and_type(struct dm_pool *mem, const struct logical_volume *lv,
* device that is not combined with any other type. So just copy what
* we have set for "layout" and use it for "type" too.
*/
- if (dm_list_empty(*type))
- str_list_dup(mem, *type, *layout);
+ if (dm_list_empty(*type) &&
+ !str_list_dup(mem, *type, *layout))
+ goto_bad;
return 1;
bad:
9 years, 8 months
master - lvscan: check result of id_write_format
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cdb16a603954a1...
Commit: cdb16a603954a1a3771644a101d0b372f8e0826c
Parent: ad9aee9af46690032a0480ebd1023f400ea15841
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 19 14:26:06 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
lvscan: check result of id_write_format
Currently rather impossible to happen - but check
for returned value of id_write_format().
---
tools/lvscan.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/lvscan.c b/tools/lvscan.c
index 487c4cf..f05fd50 100644
--- a/tools/lvscan.c
+++ b/tools/lvscan.c
@@ -33,9 +33,11 @@ static int _lvscan_single_lvmetad(struct cmd_context *cmd, struct logical_volume
dm_list_iterate_items(pvl, &all_pvs) {
if (!pvl->pv->dev) {
- id_write_format(&pvl->pv->id, pvid_s, sizeof(pvid_s));
- log_warn("WARNING: Device for PV %s already missing, skipping.",
- pvid_s);
+ if (!id_write_format(&pvl->pv->id, pvid_s, sizeof(pvid_s)))
+ stack;
+ else
+ log_warn("WARNING: Device for PV %s already missing, skipping.",
+ pvid_s);
continue;
}
if (!lvmetad_pvscan_single(cmd, pvl->pv->dev, NULL))
9 years, 8 months
master - metadata: check result of refresh and rescan
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ad9aee9af46690...
Commit: ad9aee9af46690032a0480ebd1023f400ea15841
Parent: 6d7f260f92329d394ece7447e58a46cd26d9a5a9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 19 14:25:02 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
metadata: check result of refresh and rescan
Detect failure in case refresh_filters of lvmcache_label_scan fails.
---
lib/metadata/metadata.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index d483225..168c110 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -1414,10 +1414,16 @@ static int _pvcreate_check(struct cmd_context *cmd, const char *name,
out:
if (filter_refresh_needed)
- refresh_filters(cmd);
+ if (!refresh_filters(cmd)) {
+ stack;
+ r = 0;
+ }
if (scan_needed)
- lvmcache_label_scan(cmd, 2);
+ if (!lvmcache_label_scan(cmd, 2)) {
+ stack;
+ r = 0;
+ }
free_pv_fid(pv);
return r;
9 years, 8 months
master - dmeventd: fix test for select return value
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6d7f260f92329d...
Commit: 6d7f260f92329d394ece7447e58a46cd26d9a5a9
Parent: 84860fd54f05ca24c389ee60c4aef6903ae227ce
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 19 14:20:22 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Aug 19 14:33:06 2014 +0200
dmeventd: fix test for select return value
Do not call read when select return -1 && EINTR.
Also check for return valuer from read() and
abort write function when unexpected error happens.
---
daemons/dmeventd/libdevmapper-event.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c
index 6b7338f..6e41b0a 100644
--- a/daemons/dmeventd/libdevmapper-event.c
+++ b/daemons/dmeventd/libdevmapper-event.c
@@ -297,13 +297,21 @@ static int _daemon_write(struct dm_event_fifos *fifos,
FD_ZERO(&fds);
FD_SET(fifos->server, &fds);
ret = select(fifos->server + 1, &fds, NULL, NULL, &tval);
- if ((ret < 0) && (errno != EINTR)) {
+ if (ret < 0) {
+ if (errno == EINTR)
+ continue;
log_error("Unable to talk to event daemon");
return 0;
}
if (ret == 0)
break;
ret = read(fifos->server, drainbuf, sizeof(drainbuf));
+ if (ret < 0) {
+ if ((errno == EINTR) || (errno == EAGAIN))
+ continue;
+ log_error("Unable to talk to event daemon");
+ return 0;
+ }
}
while (bytes < size) {
9 years, 8 months
v2_02_108 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fc922e47bfbc7d...
Commit: fc922e47bfbc7dfb05352d300deddbd2829774c4
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2014-07-23 15:18 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2014-07-23 15:18 +0000
annotated tag: v2_02_108 has been created
at fc922e47bfbc7dfb05352d300deddbd2829774c4 (tag)
tagging 52217f6ebd3dee25808344a9425fc085427075e4 (commit)
replaces v2_02_107
Release 2.02.108.
116 files changed, 4625 insertions(+), 1830 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlPP0mIACgkQIoGRwVZ+LBf+zgCdEYCQgygUxopFZsMN9M/h1e9Z
nQ8An2k3MBAb+VvV9AAltwkOWsprCmNO
=Xehg
-----END PGP SIGNATURE-----
Alasdair G Kergon (15):
post-release
make: Fix pofile and .d file generation.
report: Exclude hidden devices from lv_path field.
report: Add lv_dm_path and lv_full_name fields.
vgsplit: Fix VG component of lvid.
report: Add lv_parent field.
vgsplit: Improve message when LV still active.
report: Rename common fields to special fields.
raid: Correct degraded warning message level
config: Adjust description of activation_mode.
metadata: Reinstate system info in metadata.
raid: Moved degraded activation code to raid_manip.
report: Remove lv_target_type field.
pre-release
raid: Fix partial activation logic for non-raid.
David Teigland (4):
man: lvmthin fix line breaks
man: use macros for indenting in lvmthin
man: lvmcache updates
man: rework lvmcache to match lvmthin
Jonathan Brassow (6):
test: Test addition to show incorrect allocator behavior
raid/misc: Allow creation of parallel areas by LV vs segment
misc: after releasing a PV segment, merge it with any adjacent free space
raid: Allow repair to reuse PVs from same image that suffered a PV failure
activation: Add "degraded" activation mode
test: Test failing due to too few PVs
Peter Rajnoha (41):
coverity: fix issues reported by coverity
coverity: mark new switch cases with 'fall through' comment for coverity to stop complaining
filters: always reevaluate filter before creating a PV
man: do not mention '(i)nherited' for alloc policy in vg_attr field
libdm: fix double const for "value" in dm_report_reserved_value structure
activation: fix typo in 'activation skip' message
refactor: remove static modifier for lv_raid_image_in_sync and lv_raid_healthy fn
lv_manip: add get_lv_type_name/lv_is_linear and lv_is_striped helper fns
reporter: add separate LVSINFO report type
refactor: use new LVSINFO report type for lv_kernel_{major,minor,read_ahead} field
report: add separate fields for PV/VG/LV attributes
tools: add --binary arg to pvs,vgs,lvs and {pv,vg,lv}display -C and report/binary_values_as_numeric lvm.conf option
report: adapt selection code to recognize per-field reserved values
report: define reserved values/synonyms for some attribute fields
metadata: fix regression causing PVs not in VGs to be marked as allocatable
report: fix segfault while reporting PV/LV segment fields together with LV fields needeing device status (LVSINFO)
report: addendum for previous commit
WHATS_NEW: commits a473435..7021c8f1
lv_manip: pool-metadata-spare is just a spare LV, not tightly bound to thin or cache
conf: comment out devices/preferred_names and filter setting
report: report unknown/-1 for binary fields with unknown value
cleanup: use macros for definition of reporting/selection reserved values
report: 'whether' -> 'set if' in field description
report: add lv_active_{locally,remotely,exclusively} LV reporting fields
cleanup: move _lvactive_disp and _thinzero_disp under 'attribute' display functions
report: also recognize 'yes'/'no' for selection criteria on binary fields
report: add values.h for per-field reserved value declaration
conf: command_profile_template: global/binary_values_as_numeric -> report/binary_values_as_numeric
cleanup: report reserved value macros
cleanup: also use values.h for final dm_report_reserved_value array composition
report: reserved value: description for undefined value
report: report LV's zero field as binary field
tests: LV's zero field now reported as binary field
libdm: report: fix string list internal representation if delimiter is composed of more than one char
conf: add report/list_item_separator lvm.conf option
report: also report linear and striped for lv_target_type
report: display 'unknown' value for LVSINFO fields if unable to get info
report: display 'unknown' value for active/active_locally/active_remotely/active_exclusively if info bypassed
report: display 'unknown' value for lv_active_remotely field if the LV is also active locally
metadata: fix ALLOCATABLE_PV for lvm1 format
WHATS_NEW: recent commits
Petr Rockai (4):
lvscan: Implement a --cache mode.
dmeventd: Call lvscan --cache in the RAID plugin.
WHATS_NEW: lvscan --cache, dmeventd RAID + lvmetad
man: Update the lvscan manpage with a section on --cache.
Zdenek Kabelac (76):
thin: repaired LV uses _meta%d
thin: do not create reserved LVs
cleanup: more lv_is_ functions
uuid: add more private uuid sufixes
cleanup: ignore vg_name in /lib
uuid: revert uuids for mirrors and raids
mirror: mirror_or_raid_type_requested update
raid: switch to log_warn
raid: don't skip prompt with force
lvremove: remove thin volumes on damaged pools
thin: fix chunk_size conversion prompt skip
pool: delay conversion prompt
fsadm: avoid using -a in test
display: add display_lvname
cleanup: libdm simplier error comparation
cleanup: line indent
cleanup: verbose in human readable size
cleanup: a bit better error message
cleanup: use unsigned type for command
cleanup: add braces for if()
tests: avoid hiding results in local
tests: replace cat with $(<
cleanup: drop inline and add prefix _ for static
tests: ensure data hits cow
dev-type: print log_sys_debug
dev-type: print aborting log_error
cleanup: drop unneeded initialization
cleanup: just safely copy string
cache: add tool support
configure
prompt: display 'n' for EOF
lvconvert: fix return codes
lvconvert: snapshot prompts to confirm conversion
lv_is_pool: add new defines
lvchange: just skip on cache pool
display: show C only for cache and cachepool
pool: move code to pool source file
pool: callback handle cache
tools: arg_is_any_set and arg_is_only_set
lvconvert: relocate mirror tests
cache: warn about metadata size limits
cleanup: indent changes
cleanup: move merge option
cleanup: reorder code
cleanup: shift detection of chunksize sign
lvconvert: update for thin a cache
lvconvert: update help
man: lvconvert update
cleanup: lvconvert reoder repair check
tests: updates for new lvconvert
cleanup: older gcc is not smart enough
cleanup: drop unintend debug error line
lvconvert: fix mirror path
cleanup: lets make it really obvious for gcc
lvconvert: fix missing repair option
lvconvert: add missing option for repair
lvconvert: move to single name validation
lvconvert: improve splitsnapshot test
lvconvert: improve merge validation
cache: use get_cache_mode for validation
metadata: use outfc for comments
raid: support lvdisplay --maps
cleanup: check arg_count once
cleanup: typo in message
cleanup: drop testing impossible path
tests: use bigger metadata
tools: switch logic for new arg_ func
lvconvert: better testing order
thin and cache: unify pool common code
cleanup: show better messages
man: lvconvert poolmetadataspare
tests: use full option name
tests: new lvconvert features
tests: use exclusive activation
tests: support cluster run
tests: still unusable kernel
9 years, 8 months
v2_02_109 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=825573e72c7b70...
Commit: 825573e72c7b7041d91702e3c82073a01b2ec6f9
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2014-08-05 01:08 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2014-08-05 01:08 +0000
annotated tag: v2_02_109 has been created
at 825573e72c7b7041d91702e3c82073a01b2ec6f9 (tag)
tagging 9d4e1e51a944c07bad56fe41407b84afefb39357 (commit)
replaces v2_02_108
Release 2.02.109.
Fixes for a few problems found in the previous release.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlPgLucACgkQIoGRwVZ+LBfizgCgz80ccvkw+PDz+5RT7j9my/gI
L18An1+9pnv/GHP8TW7jlxRFt/dQamQh
=Jh+N
-----END PGP SIGNATURE-----
Alasdair G Kergon (5):
post-release
activation: Fix upgrades using uuid suffixes.
lvresize: Allow approximation with +%FREE.
report: Remove lv_volume_type field.
pre-release
Marian Csontos (1):
test: Skip lvextend-thin when thin not available
Peter Rajnoha (2):
metadata: remove spurious "Physical volume <dev_name> not found"
filters: fix regression caused by commit e80884cd080cad7e10be4588e3493b9000649426
Petr Rockai (5):
test: Add a test for lvextend -l+100%FREE of a striped thin pool.
test: Add a test for lvscan --cache.
lvscan: Make --cache impervious to already-missing devices.
WHATS_NEW: lvscan --cache SEGV fix
lvscan: Fix possible gcc warnings in --cache implementation.
9 years, 8 months
master - lv: remove lv_type_name fn
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=84860fd54f05ca...
Commit: 84860fd54f05ca24c389ee60c4aef6903ae227ce
Parent: aec4d0c939653cfc0dadcec43a9db98597154bcb
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Aug 19 14:16:39 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Aug 19 14:16:39 2014 +0200
lv: remove lv_type_name fn
The lv_type_name function is remnant from old code that reported
only single string for the LV type. LV types are now reported
in a more extended way as keyword list that describe the type
precisely (using lv_layout_and_type fn).
The lv_type_name was used in some error messages to display the
type of the LV so just reinstate the old messages back referencing
the type directly with a string - this is enough for error messages.
They don't need to display the LV type as precisely as it's used
on lvs output (which is optimized for selection anyway).
---
lib/metadata/lv_manip.c | 5 -----
lib/metadata/metadata-exported.h | 3 ---
tools/lvconvert.c | 15 +++++++--------
3 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index dd0ba33..c314377 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -151,11 +151,6 @@ static const char *_lv_type_names[] = {
[LV_TYPE_RAID_N_CONTINUE] = "n-continue",
};
-const char *lv_type_name(const struct logical_volume *lv)
-{
- return " ";
-}
-
static int _lv_type_list_mirror(struct dm_pool *mem,
const struct logical_volume *lv,
struct dm_list *layout,
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index 59d68d6..61bb140 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -910,9 +910,6 @@ int get_pv_list_for_lv(struct dm_pool *mem,
struct lv_segment *first_seg(const struct logical_volume *lv);
struct lv_segment *last_seg(const struct logical_volume *lv);
-/* Human-readable LV type name. */
-const char *lv_type_name(const struct logical_volume *lv);
-
/*
* Useful functions for managing snapshots.
*/
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 7330c73..cf8d2c0 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2718,8 +2718,8 @@ static int _lvconvert_pool(struct cmd_context *cmd,
}
if (lv_is_thin_type(metadata_lv) ||
lv_is_cache_type(metadata_lv)) {
- log_error("Can't use %s LV %s for pool metadata.",
- lv_type_name(metadata_lv), display_lvname(metadata_lv));
+ log_error("Can't use thin or cache type LV %s for pool metadata.",
+ display_lvname(metadata_lv));
return 0;
}
@@ -2822,16 +2822,15 @@ static int _lvconvert_pool(struct cmd_context *cmd,
if (!lp->yes &&
yes_no_prompt("Do you want to swap metadata of %s "
- "pool with %s volume %s? [y/n]: ",
+ "pool with metadata volume %s? [y/n]: ",
display_lvname(pool_lv),
- lv_type_name(metadata_lv),
display_lvname(metadata_lv)) == 'n') {
log_error("Conversion aborted.");
return 0;
}
} else if (lv_is_thin_type(pool_lv)) {
- log_error("Can't use %s logical volume %s for thin pool data.",
- lv_type_name(pool_lv), display_lvname(pool_lv));
+ log_error("Can't use thin type logical volume %s for thin pool data.",
+ display_lvname(pool_lv));
return 0;
} else {
log_warn("WARNING: Converting logical volume %s%s%s to pool's data%s.",
@@ -3047,8 +3046,8 @@ static int _lvconvert_cache(struct cmd_context *cmd,
}
if (lv_is_pool(origin) || lv_is_cache_type(origin)) {
- log_error("Can't cache %s volume %s.",
- lv_type_name(origin), display_lvname(origin));
+ log_error("Can't cache pool or cache type volume %s.",
+ display_lvname(origin));
return 0;
}
9 years, 8 months