[PATCH] libparted: remove limits on loop labels
Colin Watson
cjwatson at ubuntu.com
Thu Aug 19 10:07:20 UTC 2010
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.
* 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.
---
NEWS | 3 +++
libparted/labels/pt-limit.gperf | 3 ++-
tests/t9021-maxima.sh | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index a1863fc..8eda31c 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,9 @@ 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.
+
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
--
1.7.2.1.364.gf88bdb
More information about the parted-devel
mailing list