diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-11-24 10:06:55 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-11-24 10:06:55 +0000 |
commit | 2b9348eac1d8c1bfccb1033e68168ce5f864162e (patch) | |
tree | 44ac1dad2a770af4c001c47339c50eafd4c09591 /sys-fs/lvm2 | |
parent | Initial import. New dependency for dev-ruby/camping. Ebuild by Michel Boavent... (diff) | |
download | gentoo-2-2b9348eac1d8c1bfccb1033e68168ce5f864162e.tar.gz gentoo-2-2b9348eac1d8c1bfccb1033e68168ce5f864162e.tar.bz2 gentoo-2-2b9348eac1d8c1bfccb1033e68168ce5f864162e.zip |
Commit forgotten patch (by Alexander Tsoy)
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r-- | sys-fs/lvm2/ChangeLog | 6 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.02.97-strict-aliasing.patch | 77 |
2 files changed, 82 insertions, 1 deletions
diff --git a/sys-fs/lvm2/ChangeLog b/sys-fs/lvm2/ChangeLog index 78494de7aa9f..85f97007e24e 100644 --- a/sys-fs/lvm2/ChangeLog +++ b/sys-fs/lvm2/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-fs/lvm2 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.277 2012/11/24 08:45:08 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/ChangeLog,v 1.278 2012/11/24 10:06:55 pacho Exp $ + + 24 Nov 2012; Pacho Ramos <pacho@gentoo.org> + +files/lvm2-2.02.97-strict-aliasing.patch: + Commit forgotten patch (by Alexander Tsoy) *lvm2-2.02.97-r1 (24 Nov 2012) diff --git a/sys-fs/lvm2/files/lvm2-2.02.97-strict-aliasing.patch b/sys-fs/lvm2/files/lvm2-2.02.97-strict-aliasing.patch new file mode 100644 index 000000000000..77394c0dc2fd --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.97-strict-aliasing.patch @@ -0,0 +1,77 @@ +From 6595cae6e9b65658430714b9731b604c036d0816 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac <zkabelac@redhat.com> +Date: Sat, 13 Oct 2012 18:51:07 +0000 +Subject: cleanup: resolve dereferencing type-punned pointer + +fix gcc warning: +dereferencing type-punned pointer will break strict-aliasing rules +Replace call by value and pass just const pointer to pvid. +--- +diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c +index 1a52787..a3b45d5 100644 +--- a/lib/cache/lvmetad.c ++++ b/lib/cache/lvmetad.c +@@ -444,7 +444,7 @@ int lvmetad_vg_update(struct volume_group *vg) + + dm_list_iterate_items(pvl, &vg->pvs) { + /* NB. the PV fmt pointer is sometimes wrong during vgconvert */ +- if (pvl->pv->dev && !lvmetad_pv_found(pvl->pv->id, pvl->pv->dev, ++ if (pvl->pv->dev && !lvmetad_pv_found(&pvl->pv->id, pvl->pv->dev, + vg->fid ? vg->fid->fmt : pvl->pv->fmt, + pvl->pv->label_sector, NULL, NULL)) + return 0; +@@ -657,7 +657,7 @@ static int _extract_mdas(struct lvmcache_info *info, struct dm_config_tree *cft, + return 1; + } + +-int lvmetad_pv_found(struct id pvid, struct device *device, const struct format_type *fmt, ++int lvmetad_pv_found(const struct id *pvid, struct device *device, const struct format_type *fmt, + uint64_t label_sector, struct volume_group *vg, activation_handler handler) + { + char uuid[64]; +@@ -670,7 +670,7 @@ int lvmetad_pv_found(struct id pvid, struct device *device, const struct format_ + if (!lvmetad_active() || test_mode()) + return 1; + +- if (!id_write_format(&pvid, uuid, sizeof(uuid))) ++ if (!id_write_format(pvid, uuid, sizeof(uuid))) + return_0; + + pvmeta = dm_config_create(); +@@ -848,7 +848,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev, + * *exact* image of the system, the lvmetad instance that went out of + * sync needs to be killed. + */ +- if (!lvmetad_pv_found(*(struct id *)dev->pvid, dev, lvmcache_fmt(info), ++ if (!lvmetad_pv_found((const struct id *) &dev->pvid, dev, lvmcache_fmt(info), + label->sector, baton.vg, handler)) { + release_vg(baton.vg); + goto_bad; +diff --git a/lib/cache/lvmetad.h b/lib/cache/lvmetad.h +index 724922d..5f0f552 100644 +--- a/lib/cache/lvmetad.h ++++ b/lib/cache/lvmetad.h +@@ -93,7 +93,7 @@ int lvmetad_vg_remove(struct volume_group *vg); + * number on the cached and on the discovered PV match but the metadata content + * does not. + */ +-int lvmetad_pv_found(struct id pvid, struct device *device, ++int lvmetad_pv_found(const struct id *pvid, struct device *device, + const struct format_type *fmt, uint64_t label_sector, + struct volume_group *vg, activation_handler handler); + +diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c +index 5a633b6..c210a63 100644 +--- a/lib/metadata/metadata.c ++++ b/lib/metadata/metadata.c +@@ -3807,7 +3807,7 @@ int pv_write(struct cmd_context *cmd __attribute__((unused)), + if (!pv->fmt->ops->pv_write(pv->fmt, pv)) + return_0; + +- if (!lvmetad_pv_found(pv->id, pv->dev, pv->fmt, pv->label_sector, ++ if (!lvmetad_pv_found(&pv->id, pv->dev, pv->fmt, pv->label_sector, + NULL, NULL)) + return_0; + +-- +cgit v0.9.0.3 |