r1983 - in trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian: . patches patches/series

maks andries maks-guest@haydn.debian.org
Tue, 07 Dec 2004 16:37:28 -0700


Author: maks-guest
Date: 2004-12-07 16:36:36 -0700 (Tue, 07 Dec 2004)
New Revision: 1983

Added:
   trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/fs-partitions-check.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog
   trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4
Log:
also restore BLKRRPART ioctl behaviour for 2.6.9


Modified: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog	2004-12-07 23:21:34 UTC (rev 1982)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/changelog	2004-12-07 23:36:36 UTC (rev 1983)
@@ -24,6 +24,10 @@
   * [SECURITY] Fix buffer overrun in x86_64's sys32_ni_syscall
     (Andres Salomon).
 
+  * Restore BLKRRPART semantics - breaks partitioning programms on empty disks
+    (Maximilian Attems).
+
+
  -- dann frazier <dannf@debian.org>  Fri, 03 Dec 2004 09:26:52 -0700
 
 kernel-source-2.6.9 (2.6.9-3) unstable; urgency=low

Added: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/fs-partitions-check.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/fs-partitions-check.dpatch	2004-12-07 23:21:34 UTC (rev 1982)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/fs-partitions-check.dpatch	2004-12-07 23:36:36 UTC (rev 1983)
@@ -0,0 +1,24 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: restore BLKRRPART ioctl semantics
+## DP: Patch author: Andries Brouwer
+## DP: Upstream status: backport 2.6.10-rc3-bk2
+## DP: Reference: http://marc.theaimsgroup.com/?l=linux-kernel&m=110229798426631&w=2
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+diff -Nru a/fs/partitions/check.c b/fs/partitions/check.c
+--- a/fs/partitions/check.c	2004-12-07 15:08:27 -08:00
++++ b/fs/partitions/check.c	2004-12-07 15:08:27 -08:00
+@@ -395,7 +395,7 @@
+ 	if (disk->fops->revalidate_disk)
+ 		disk->fops->revalidate_disk(disk);
+ 	if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
+-		return -EIO;
++		return 0;
+ 	for (p = 1; p < state->limit; p++) {
+ 		sector_t size = state->parts[p].size;
+ 		sector_t from = state->parts[p].from;

Modified: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4	2004-12-07 23:21:34 UTC (rev 1982)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/series/2.6.9-4	2004-12-07 23:36:36 UTC (rev 1983)
@@ -5,3 +5,4 @@
 + unix-serialize-dgram.dpatch
 + drivers-firmware-pcdp-register.dpatch
 + arch-x86_64-sys32_ni-overflow.dpatch
++ fs-partitions-check.dpatch