summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-09-14 08:24:44 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-09-14 08:24:44 +0000
commit95cdd131e10e450a2027f4f40da91d4052848ebd (patch)
treee14259c8a9382d6cddef7285dcf1cfd8b88c4bae /sys-fs/lvm2/files
parentRaise gtk-doc depend to 1.11 wrt #284831. (diff)
downloadhistorical-95cdd131e10e450a2027f4f40da91d4052848ebd.tar.gz
historical-95cdd131e10e450a2027f4f40da91d4052848ebd.tar.bz2
historical-95cdd131e10e450a2027f4f40da91d4052848ebd.zip
Bug #283983: pvcreate hangs on 2.6.30/.31 presently, waiting for a new release from upstream.
Package-Manager: portage-2.2_rc40/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/lvm2/files')
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.51-fix-pvcreate.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.02.51-fix-pvcreate.patch b/sys-fs/lvm2/files/lvm2-2.02.51-fix-pvcreate.patch
new file mode 100644
index 000000000000..370ab6d5ad11
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.02.51-fix-pvcreate.patch
@@ -0,0 +1,98 @@
+Upstream patch:
+https://www.redhat.com/archives/lvm-devel/2009-August/msg00106.html
+
+# ===================================================================
+# RCS file: /cvs/lvm2/LVM2/WHATS_NEW,v
+# retrieving revision 1.1241
+# retrieving revision 1.1242
+# diff -u -r1.1241 -r1.1242
+# --- LVM2/WHATS_NEW 2009/08/13 17:16:38 1.1241
+# +++ LVM2/WHATS_NEW 2009/08/19 15:34:33 1.1242
+# @@ -1,5 +1,6 @@
+# Version 2.02.52 -
+# =================================
+# + Fix pvcreate on a partition (2.02.51).
+# Fix vgcfgrestore error paths when locking fails (2.02.49).
+# Added configure --enable-clogd to conditionally build the cluster log daemon.
+# Make lvchange --refresh only take a read lock on volume group.
+# ===================================================================
+# RCS file: /cvs/lvm2/LVM2/lib/device/dev-md.c,v
+# retrieving revision 1.18
+# retrieving revision 1.19
+diff -u -r1.18 -r1.19
+--- LVM2/lib/device/dev-md.c 2009/08/01 17:14:52 1.18
++++ LVM2/lib/device/dev-md.c 2009/08/19 15:34:43 1.19
+@@ -137,13 +137,15 @@
+ if (!sysfs_dir || !*sysfs_dir)
+ return ret;
+
+-check_md_major:
+- if (MAJOR(dev) != md_major()) {
+- if (get_primary_dev(sysfs_dir, blkdev, &dev))
+- goto check_md_major;
+- return ret;
++ if (MAJOR(dev) == blkext_major()) {
++ /* lookup parent MD device from blkext partition */
++ if (!get_primary_dev(sysfs_dir, blkdev, &dev))
++ return ret;
+ }
+
++ if (MAJOR(dev) != md_major())
++ return ret;
++
+ ret = dm_snprintf(path, size, "%s/dev/block/%d:%d/md/%s", sysfs_dir,
+ (int)MAJOR(dev), (int)MINOR(dev), attribute);
+ if (ret < 0) {
+===================================================================
+RCS file: /cvs/lvm2/LVM2/lib/filters/filter.c,v
+retrieving revision 1.48
+retrieving revision 1.49
+diff -u -r1.48 -r1.49
+--- LVM2/lib/filters/filter.c 2009/07/09 22:34:02 1.48
++++ LVM2/lib/filters/filter.c 2009/08/19 15:34:46 1.49
+@@ -38,6 +38,7 @@
+ } device_info_t;
+
+ static int _md_major = -1;
++static int _blkext_major = -1;
+ static int _device_mapper_major = -1;
+
+ int md_major(void)
+@@ -45,6 +46,11 @@
+ return _md_major;
+ }
+
++int blkext_major(void)
++{
++ return _blkext_major;
++}
++
+ /*
+ * Devices are only checked for partition tables if their minor number
+ * is a multiple of the number corresponding to their type below
+@@ -197,6 +203,10 @@
+ if (!strncmp("md", line + i, 2) && isspace(*(line + i + 2)))
+ _md_major = line_maj;
+
++ /* Look for blkext device */
++ if (!strncmp("blkext", line + i, 6) && isspace(*(line + i + 6)))
++ _blkext_major = line_maj;
++
+ /* Look for device-mapper device */
+ /* FIXME Cope with multiple majors */
+ if (!strncmp("device-mapper", line + i, 13) && isspace(*(line + i + 13)))
+===================================================================
+RCS file: /cvs/lvm2/LVM2/lib/filters/filter.h,v
+retrieving revision 1.15
+retrieving revision 1.16
+diff -u -r1.15 -r1.16
+--- LVM2/lib/filters/filter.h 2007/08/20 20:55:25 1.15
++++ LVM2/lib/filters/filter.h 2009/08/19 15:34:46 1.16
+@@ -36,6 +36,7 @@
+ void lvm_type_filter_destroy(struct dev_filter *f);
+
+ int md_major(void);
++int blkext_major(void);
+ int max_partitions(int major);
+
+ #endif