[udisks2/f17] Fix VPD / WWN problem for Samsung drives (#887979)
David Zeuthen
davidz at fedoraproject.org
Mon Dec 17 20:36:59 UTC 2012
commit e0f3c85539110751f0730bc37fc2b83f5b0b0644
Author: David Zeuthen <zeuthen at gmail.com>
Date: Mon Dec 17 15:36:34 2012 -0500
Fix VPD / WWN problem for Samsung drives (#887979)
...both-WWN-and-serials-for-VPD-if-available.patch | 41 ++++++++++++++++++++
udisks2.spec | 9 ++++-
2 files changed, 49 insertions(+), 1 deletions(-)
---
diff --git a/udisks-2.0.0-Use-both-WWN-and-serials-for-VPD-if-available.patch b/udisks-2.0.0-Use-both-WWN-and-serials-for-VPD-if-available.patch
new file mode 100644
index 0000000..d1f629c
--- /dev/null
+++ b/udisks-2.0.0-Use-both-WWN-and-serials-for-VPD-if-available.patch
@@ -0,0 +1,41 @@
+From 698c6c4fae49192e55f669c4b8c2cbad9f92a9fb Mon Sep 17 00:00:00 2001
+From: David Zeuthen <zeuthen at gmail.com>
+Date: Mon, 17 Dec 2012 15:18:40 -0500
+Subject: [PATCH] Use both WWN and serials for VPD, if available
+
+This fixes a problem with SAMSUNG drives returning the same WWN for
+different drives:
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=887979
+
+Signed-off-by: David Zeuthen <zeuthen at gmail.com>
+---
+ src/udiskslinuxdriveobject.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/udiskslinuxdriveobject.c b/src/udiskslinuxdriveobject.c
+index 1aa58a8..f2391b9 100644
+--- a/src/udiskslinuxdriveobject.c
++++ b/src/udiskslinuxdriveobject.c
+@@ -736,13 +736,16 @@ check_for_vpd (GUdevDevice *device)
+
+ g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
+
+- /* order of preference: WWN, serial, path */
++ /* order of preference: WWN_serial, WWN, serial, path */
+ serial = g_udev_device_get_property (device, "ID_SERIAL");
+ wwn = g_udev_device_get_property (device, "ID_WWN_WITH_EXTENSION");
+ path = g_udev_device_get_property (device, "ID_PATH");
+ if (wwn != NULL && strlen (wwn) > 0 && !is_wwn_black_listed (wwn))
+ {
+- ret = g_strdup (wwn);
++ if (serial != NULL && strlen (serial) > 0)
++ ret = g_strdup_printf ("%s_%s", wwn, serial);
++ else
++ ret = g_strdup (wwn);
+ }
+ else if (serial != NULL && strlen (serial) > 0)
+ {
+--
+1.8.0.2
+
diff --git a/udisks2.spec b/udisks2.spec
index f1e0f64..d425bd7 100644
--- a/udisks2.spec
+++ b/udisks2.spec
@@ -13,7 +13,7 @@
Summary: Disk Manager
Name: udisks2
Version: 1.94.0
-Release: 10%{?dist}
+Release: 11%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.freedesktop.org/wiki/Software/udisks
@@ -79,6 +79,9 @@ Patch4: udisks-1.99.0-Black-list-seemingly-invalid-WWN-for-SAMSUNG-SP1604N.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=865801
Patch5: udisks-1.94.0-use-libacl.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=887979
+Patch6: udisks-2.0.0-Use-both-WWN-and-serials-for-VPD-if-available.patch
+
%description
udisks provides a daemon, D-Bus API and command line tools for
managing disks and storage devices. This package is for the udisks 2.x
@@ -114,6 +117,7 @@ daemon. This package is for the udisks 2.x series.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
%if 0%{?enable_autoreconf}
@@ -174,6 +178,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
# Note: please don't forget the %{?dist} in the changelog. Thanks
%changelog
+* Mon Dec 17 2012 David Zeuthen <davidz at redhat.com> - 1.94.0-11%{?dist}
+- Fix VPD / WWN problem for Samsung drives (#887979)
+
* Fri Oct 12 2012 David Zeuthen <davidz at redhat.com> - 1.94.0-10%{?dist}
- BR gnome-common when doing autoreconf
More information about the scm-commits
mailing list