2.4.36-stable kernel tree
Revision | a34c4fd7853fe577f63acd755a397fe6fa6a0092 (tree) |
---|---|
Zeit | 2006-09-29 06:53:28 |
Autor | Jurzitza, Dieter <DJurzitza@harm...> |
Commiter | Willy Tarreau |
[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>
@@ -204,7 +204,8 @@ char *disk_name (struct gendisk *hd, int minor, char *buf) | ||
204 | 204 | /* |
205 | 205 | * Add a partitions details to the devices partition description. |
206 | 206 | */ |
207 | -void add_gd_partition(struct gendisk *hd, int minor, int start, int size) | |
207 | +void add_gd_partition(struct gendisk *hd, int minor, unsigned int start, | |
208 | + unsigned int size) | |
208 | 209 | { |
209 | 210 | #ifndef CONFIG_DEVFS_FS |
210 | 211 | char buf[40]; |
@@ -2,7 +2,8 @@ | ||
2 | 2 | * add_partition adds a partitions details to the devices partition |
3 | 3 | * description. |
4 | 4 | */ |
5 | -void add_gd_partition(struct gendisk *hd, int minor, int start, int size); | |
5 | +void add_gd_partition(struct gendisk *hd, int minor, unsigned int start, | |
6 | + unsigned int size); | |
6 | 7 | |
7 | 8 | typedef struct {struct page *v;} Sector; |
8 | 9 |