Hello community,

here is the log from the commit of package parted for openSUSE:Factory checked 
in at 2014-02-19 11:36:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/parted (Old)
 and      /work/SRC/openSUSE:Factory/.parted.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "parted"

Changes:
--------
--- /work/SRC/openSUSE:Factory/parted/parted.changes    2014-02-17 
09:40:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.parted.new/parted.changes       2014-02-19 
11:36:17.000000000 +0100
@@ -1,0 +2,9 @@
+Mon Feb 17 13:32:19 UTC 2014 - pu...@suse.com
+
+- Fixup last commit - call BLKRRPART only for DASDs
+- added patches:
+  * libparted-use-BLKRRPART-for-DASD.patch.patch
+- removed patches:
+  * revert-libparted-remove-now-worse-than-useless-_kern.patch
+  * revert-linux-remove-DASD-restriction-on-_disk_sync_p.patch
+-------------------------------------------------------------------

Old:
----
  revert-libparted-remove-now-worse-than-useless-_kern.patch
  revert-linux-remove-DASD-restriction-on-_disk_sync_p.patch

New:
----
  libparted-use-BLKRRPART-for-DASD.patch.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ parted.spec ++++++
--- /var/tmp/diff_new_pack.uUdUPA/_old  2014-02-19 11:36:18.000000000 +0100
+++ /var/tmp/diff_new_pack.uUdUPA/_new  2014-02-19 11:36:18.000000000 +0100
@@ -58,8 +58,7 @@
 Patch28:        parted-resize-command.patch
 Patch29:        libparted-dasd-do-not-use-first-tracks.patch
 Patch30:        libparted-initialize-dasd-part-type.patch
-Patch31:        revert-linux-remove-DASD-restriction-on-_disk_sync_p.patch
-Patch32:        revert-libparted-remove-now-worse-than-useless-_kern.patch
+Patch31:        libparted-use-BLKRRPART-for-DASD.patch.patch
 Patch100:       parted-fatresize-autoconf.patch
 Requires:       /sbin/udevadm
 BuildRequires:  check-devel
@@ -139,7 +138,6 @@
 %patch29 -p1
 %patch30 -p1
 %patch31 -p1
-%patch32 -p1
 %patch100 -p1
 
 %build

++++++ libparted-use-BLKRRPART-for-DASD.patch.patch ++++++
>From ac422c32ae3be0e599f7b3f4ab6961b61129c4ba Mon Sep 17 00:00:00 2001
From: Petr Uzel <petr.u...@suse.cz>
Date: Fri, 14 Feb 2014 09:12:47 +0100
Subject: [PATCH] libparted-used-BLKRRPART-for-DASD.patch

Addresses: bnc#862139

This reverts upstream commit 9fa0e1800db5b9f094ae481fd95a51da03f19e95.
This reverts upstream commit 1223b9fc07859cb619c80dc057bd05458f9b5669.
and some fixups on top
---
 libparted/arch/linux.c |   50 ++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 41 insertions(+), 9 deletions(-)

Index: parted-3.1/libparted/arch/linux.c
===================================================================
--- parted-3.1.orig/libparted/arch/linux.c
+++ parted-3.1/libparted/arch/linux.c
@@ -2898,6 +2898,34 @@ _dm_reread_part_table (PedDisk* disk)
 #endif
 
 static int
+_kernel_reread_part_table (PedDevice* dev)
+{
+        LinuxSpecific*  arch_specific = LINUX_SPECIFIC (dev);
+        int             retry_count = 9;
+
+        sync();
+        while (ioctl (arch_specific->fd, BLKRRPART)) {
+                retry_count--;
+                sync();
+                if (retry_count == 3)
+                        sleep(1); /* Pause to allow system to settle */
+
+                if (!retry_count) {
+                        ped_exception_throw (
+                                PED_EXCEPTION_WARNING,
+                                PED_EXCEPTION_IGNORE,
+                        _("WARNING: the kernel failed to re-read the partition 
"
+                          "table on %s (%s).  As a result, it may not "
+                          "reflect all of your changes until after reboot."),
+                                dev->path, strerror (errno));
+                        return 0;
+                }
+        }
+
+        return 1;
+}
+
+static int
 _have_blkpg ()
 {
         static int have_blkpg = -1;
@@ -2919,15 +2947,19 @@ linux_disk_commit (PedDisk* disk)
                 return _dm_reread_part_table (disk);
 #endif
         if (disk->dev->type != PED_DEVICE_FILE) {
-
-               /* We now require BLKPG support.  If this assertion fails,
-                  please write to the mailing list describing your system.
-                  Assuming it's never triggered, ...
-                  FIXME: remove this assertion in 2012.  */
-               assert (_have_blkpg ());
-
-               if (!_disk_sync_part_table (disk))
-                       return 0;
+                /* The ioctl() command BLKPG_ADD_PARTITION does not notify
+                 * the devfs system; consequently, /proc/partitions will not
+                 * be up to date, and the proper links in /dev are not
+                 * 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 */
+               if (disk->dev->type == PED_DEVICE_DASD)
+                      return _kernel_reread_part_table(disk->dev);
+
+               assert(_have_blkpg());
+               if (!_disk_sync_part_table(disk))
+                      return 0;
         }
 
         return 1;


-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to