[parted/f15] Add patch to allow reread of partitions with DASD disks (#651478, #693764)
Dan Horák
sharkcz at fedoraproject.org
Mon Jul 25 10:18:17 UTC 2011
commit 780a1941ef7d868412ed1929a2e1bf3ba0b944fc
Author: Dan Horák <dan at danny.cz>
Date: Mon Jul 25 12:18:02 2011 +0200
Add patch to allow reread of partitions with DASD disks (#651478, #693764)
parted-2.3-dasd-part.patch | 53 ++++++++++++++++++++++++++++++++++++++++++++
parted.spec | 6 ++++-
2 files changed, 58 insertions(+), 1 deletions(-)
---
diff --git a/parted-2.3-dasd-part.patch b/parted-2.3-dasd-part.patch
new file mode 100644
index 0000000..887ea95
--- /dev/null
+++ b/parted-2.3-dasd-part.patch
@@ -0,0 +1,53 @@
+From 863fc777f9a3746ac27536accf7f60fa7820bd58 Mon Sep 17 00:00:00 2001
+From: Brian C. Lane <bcl at redhat.com>
+Date: Thu, 18 Nov 2010 14:47:27 -0800
+Subject: [PATCH] Remove DASD restriction on _disk_sync_part_table (#651478)
+
+---
+ libparted/arch/linux.c | 23 ++---------------------
+ 1 files changed, 2 insertions(+), 21 deletions(-)
+
+diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
+index 38f4e31..435cb46 100644
+--- a/libparted/arch/linux.c
++++ b/libparted/arch/linux.c
+@@ -2776,19 +2776,6 @@ _dm_reread_part_table (PedDisk* disk)
+ }
+ #endif
+
+-static int
+-_have_blkpg ()
+-{
+- static int have_blkpg = -1;
+- int kver;
+-
+- if (have_blkpg != -1)
+- return have_blkpg;
+-
+- kver = _get_linux_version();
+- return have_blkpg = kver >= KERNEL_VERSION (2,4,0) ? 1 : 0;
+-}
+-
+ /* Return nonzero upon success, 0 if something fails. */
+ static int
+ linux_disk_commit (PedDisk* disk)
+@@ -2807,14 +2794,8 @@ linux_disk_commit (PedDisk* disk)
+ * created. Therefore, if using DevFS, we must get the kernel
+ * to re-read and grok the partition table.
+ */
+- /* Work around kernel dasd problem so we really do BLKRRPART */
+- int ok = 1;
+- if (disk->dev->type != PED_DEVICE_DASD && _have_blkpg ()) {
+- if (!_disk_sync_part_table (disk))
+- ok = 0;
+- }
+-
+- return ok;
++ if (!_disk_sync_part_table (disk))
++ return 0;
+ }
+
+ return 1;
+--
+1.7.3.2
+
diff --git a/parted.spec b/parted.spec
index 4b666ab..22fad2f 100644
--- a/parted.spec
+++ b/parted.spec
@@ -4,7 +4,7 @@
Summary: The GNU disk partition manipulation program
Name: parted
Version: 2.3
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPLv3+
Group: Applications/System
URL: http://www.gnu.org/software/parted
@@ -30,6 +30,7 @@ Patch6: parted-2.3-remove-dev_t_dep.patch
Patch7: parted-2.3-Add-GPT-partition-attribute-bits.patch
Patch8: parted-2.3-Add-legacy_boot-flag-for-GPT-parititons.patch
Patch9: parted-2.3-Remove-PED_ASSERT-from-dos-geometry-checking.patch
+Patch10: parted-2.3-dasd-part.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: e2fsprogs-devel
@@ -155,6 +156,9 @@ fi
%changelog
+* Mon Jul 25 2011 Dan Horák <dan[at]danny.cz> - 2.3-10
+- Add patch to allow reread of partitions with DASD disks (#651478, #693764)
+
* Thu May 26 2011 Brian C. Lane <bcl at redhat.com> - 2.3-9
- Add support for legacy_boot flag for GPT partitions (680562)
- Remove PED_ASSERT for dos geometry calculations (585468)
More information about the scm-commits
mailing list