[lkml]   [2002]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject2.5.28 and partitions
Just saw some new partition code in 2.5.28. Good!
I like almost all I see, except for one thing:

When I did precisely these same things, long ago, I used

struct blkpg_partition {
long long start; /* starting offset in bytes */
long long length; /* length in bytes */
int pno; /* partition number */
char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2,
to be used in kernel messages */
char volname[BLKPG_VOLNAMELTH]; /* volume label */

still visible in blkpg.h.

Now I read in 2.5.28:

+struct parsed_partitions {
+ char name[40];
+ struct {
+ unsigned long from;
+ unsigned long size;
+ int flags;
+ } parts[MAX_PART];
+ int next;
+ int limit;

and I object to the long instead of u64 or so.

With 2^32 sectors one can handle up to 2^41 bytes, 2 TiB.
Already today people want RAIDs that are larger, and
few years from now we'll have single disks that are larger.

The fields from and size really need more bits than 32.
And when they become u64, it is a good idea to measure bytes
instead of 512-byte sectors.

(In the design where all partition reading code is removed
from the kernel, and user space tells the kernel what the
partitions on its disks are, it is also natural that user
space is able to provide names for the partitions.
Both names for the kernel to use in its messages, and names
to be used in mount-by-label. Of course I would like to
remove all mount-by-label code from mount(8).)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:27    [W:0.061 / U:1.056 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site