r718 - in lvm2/trunk/debian: . patches
Bastian Blank
waldi at alioth.debian.org
Sat Sep 5 11:41:51 UTC 2009
Author: waldi
Date: Sat Sep 5 11:41:50 2009
New Revision: 718
Log:
* debian/changelog: Update.
* debian/patches/series: Add new patch.
* debian/patches/upstream-pvcreate-partition.patch: Add.
Added:
lvm2/trunk/debian/patches/upstream-pvcreate-partition.patch
Modified:
lvm2/trunk/debian/changelog
lvm2/trunk/debian/patches/series
Modified: lvm2/trunk/debian/changelog
==============================================================================
--- lvm2/trunk/debian/changelog Sat Sep 5 11:27:33 2009 (r717)
+++ lvm2/trunk/debian/changelog Sat Sep 5 11:41:50 2009 (r718)
@@ -2,6 +2,7 @@
* Remove obsolete udev rule files. (closes: #542942)
* Add Homepage and Vcs-{Browser,Svn} fields. (closes: #486552, #516486)
+ * Apply upstream patch for pvcreate breakage. (closes: #542702)
-- Bastian Blank <waldi at debian.org> Sat, 05 Sep 2009 12:34:26 +0200
Modified: lvm2/trunk/debian/patches/series
==============================================================================
--- lvm2/trunk/debian/patches/series Sat Sep 5 11:27:33 2009 (r717)
+++ lvm2/trunk/debian/patches/series Sat Sep 5 11:41:50 2009 (r718)
@@ -11,3 +11,4 @@
dmsetup-export.patch
rules-subdir.patch
implicit-pointer.patch
+upstream-pvcreate-partition.patch
Added: lvm2/trunk/debian/patches/upstream-pvcreate-partition.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ lvm2/trunk/debian/patches/upstream-pvcreate-partition.patch Sat Sep 5 11:41:50 2009 (r718)
@@ -0,0 +1,66 @@
+--- 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) {
+--- 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)))
+--- 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
More information about the pkg-lvm-commits
mailing list