• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisiona34c4fd7853fe577f63acd755a397fe6fa6a0092 (tree)
Zeit2006-09-29 06:53:28
AutorJurzitza, Dieter <DJurzitza@harm...>
CommiterWilly Tarreau

Log Message

[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>

Ändern Zusammenfassung

Diff

--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -204,7 +204,8 @@ char *disk_name (struct gendisk *hd, int minor, char *buf)
204204 /*
205205 * Add a partitions details to the devices partition description.
206206 */
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)
208209 {
209210 #ifndef CONFIG_DEVFS_FS
210211 char buf[40];
--- a/fs/partitions/check.h
+++ b/fs/partitions/check.h
@@ -2,7 +2,8 @@
22 * add_partition adds a partitions details to the devices partition
33 * description.
44 */
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);
67
78 typedef struct {struct page *v;} Sector;
89
Show on old repository browser