OSDN Git Service

[PATCH] really fix size display for sun partitions larger than 1TByte
authorJurzitza, Dieter <DJurzitza@harmanbecker.com>
Tue, 12 Sep 2006 11:23:56 +0000 (13:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Sep 2006 21:53:28 +0000 (23:53 +0200)
commita34c4fd7853fe577f63acd755a397fe6fa6a0092
tree45c421609ea8a5e69146fcec0c347a0469ef64f8
parent4178cd8d9a552390bd76d5946e7e18e01f4720ec
[PATCH] really fix size display for sun partitions larger than 1TByte

Problem: the last fix introduced by Jeff Mahoney for kernel 2.6 was not
complete for kernel 2.4 (as applied). I found out that add_gd_partition
is called by any type of partition (2.4).  add_gd_partition is defined
as add_gd_partition (int, int), what makes no sense to me as negative
numbers should never occur here.  As long as add_gd_partition is not
changed to add_gd_partition (unsigned, unsigned), /proc/partitions will
keep showing negative numbers.

If ever someone could look into this, within the different partition
type files in linux/fs/partitions the parameters to add_gd_partitions
seem to be chosen arbitrarily between int, unsigned and unsigned long,
whatever seemed to be appropriate, I think it would make sense to get
consistent parameters to add_gd_partition from all partition types here.
Especially if one takes into account that sizeof (long) and sizeof (int)
may differ significantly i. e. on sparc.

Signed-off-by: Dieter Jurzitza <DJurzitza@HarmanBecker.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/partitions/check.c
fs/partitions/check.h