summaryrefslogtreecommitdiff
path: root/include/linux/kmalloc_sizes.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-04-20 00:29:12 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-04-20 00:29:12 -0700
commit5fb58500eec7e5afab139a6b3825c55fbbeff48c (patch)
tree2d5274d558729b4d8cb3842f58d310ad6a5c728a /include/linux/kmalloc_sizes.h
parent88bdd4c3d1faed465755e2b0f5b9c34352693ac5 (diff)
[PATCH] Allocate hd_structs dynamically
From: Badari Pulavarty <pbadari@us.ibm.com> Here is the patch to allocate hd_struct dynamically as we find partitions. There are 3 things I didn't like in the patch. 1) The patch allocates 15 pointers instead of 15 hd_structs. (incase of s= csi). I was really hoping to get rid of "15" and make it really dynamic. (In ca= se if we ever want to support more than 15 partitions per disk etc..).=20 I was thought about making it a linked list, but blk_partition_remap() needs to get to hd_struct for a given partition everytime we do IO. So linked list would be bad, we really need direct access to partition in= fo. 2) I had to add "partno" to hd_struct, since part_dev_read() used to calc= ulate partition number from the address before. 3) kmalloc() failure in add_partition() will be silently ignored. It saves 2048 bytes per disk.
Diffstat (limited to 'include/linux/kmalloc_sizes.h')
0 files changed, 0 insertions, 0 deletions