lkml.org 
[lkml]   [1998]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: memory waste in fs/devices.c/kdevname()
	From: Riley Williams <rhw@bigfoot.com>

My analysis goes like this: kdev_t is a bitfield

NO!!

kdev_t is the kernel device type.

It is (on some machines, like mine) a pointer to a structure
with certain fields
[like int major, minor; a bit indicating char/block device;
values for size, blocksize, hardsect_size, read_ahead;
a routine that produces a name, etc.]
On certain more old-fashioned machines it may be an integral type.

No part of the kernel today is supposed to know anything
about this type - it is completely opaque - except for kdev_t.h .

Unfortunately, not everybody keeps the distinction between
dev_t and kdev_t. In Jan or Feb this year I submitted some patches
to make the kernel ready for switching to a pointer kdev_t type
and most were applied, but not the last one.
(Maybe rightly so - the other patches were clear improvements
of the code; the last patch was just the introduction of a layer
of defines to hide the NFS problems behind.)
Will try one of these days to see how kdev_t cleanliness has
survived the past year.

Andries


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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