[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Sun Aug 22 21:40:45 UTC 2010


 NEWS                            |    4 ++++
 libparted/labels/pt-limit.gperf |    3 ++-
 tests/t9021-maxima.sh           |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit fb1616546c56d5f78fce9076e6fa72e179d06ad6
Author: Colin Watson <cjwatson at ubuntu.com>
Date:   Thu Aug 19 11:07:20 2010 +0100

    libparted: remove limits on loop labels
    
    There's no reason to impose any particular limit on loop labels, since
    they just represent a single large partition.  Sector counts over 2^32
    are needed for large RAID arrays.  Change the limit to 2^64 since that's
    the upper limit imposed by libparted and it saves us implementing the
    limit functions separately.  This bug appears to have been introduced
    by commit 2dbc645c.
    
    * libparted/labels/pt-limit.gperf: Change limits on "loop" to 2^64.
    * tests/t9021-maxima.sh: Update for the new loop limit.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index a1863fc..5dd7dca 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ GNU parted NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  libparted: raise the limit on the maximum start sector and the
+  maximum number of sectors in a "loop" partition table from 2^32 to 2^64.
+  [bug introduced in parted-2.1]
+
   libparted once again recognizes a whole-disk FAT partition
   [bug introduced in parted-1.9.0]
 
diff --git a/libparted/labels/pt-limit.gperf b/libparted/labels/pt-limit.gperf
index f834647..3d764ae 100644
--- a/libparted/labels/pt-limit.gperf
+++ b/libparted/labels/pt-limit.gperf
@@ -19,7 +19,8 @@ sun,128ULL*UINT32_MAX,UINT32_MAX
 #
 bsd,UINT32_MAX,UINT32_MAX
 # aix,UINT32_MAX,UINT32_MAX
-loop,UINT32_MAX,UINT32_MAX
+# In reality, loop labels have no particular limit.
+loop,UINT64_MAX,UINT64_MAX
 pc98,UINT32_MAX,UINT32_MAX
 #
 # FIXME: not verified.  looks like these are cylinder aligned, too
diff --git a/tests/t9021-maxima.sh b/tests/t9021-maxima.sh
index eb44eea..0f16297 100755
--- a/tests/t9021-maxima.sh
+++ b/tests/t9021-maxima.sh
@@ -42,7 +42,7 @@ for t in msdos gpt dvh sun mac bsd amiga loop pc98; do
     max_start=4294967295
     max_len=4294967295
     case $t in
-	gpt) max_start=18446744073709551615; max_len=$max_start;;
+	gpt|loop) max_start=18446744073709551615; max_len=$max_start;;
 	sun) max_start=549755813760;; # 128 * (2^32-1)
     esac
 



More information about the Parted-commits mailing list