lkml.org 
[lkml]   [2003]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [CFT] more kdev_t-ectomy
> MKDEV(<constant>,<constant>) is a valid thing, as far as I'm concerned.

Yes. I was tempted to change the first argument of blk_register_region
into a pair, killing some MKDEV occurrences, but then I noticed that
almost all are of the form MKDEV(<constant>,<constant>), and that
is not so bad.

Still, the fact that every single call of blk_register_region
has a first argument MKDEV(ma,mi) suggests that one might
consider leaving these parameters separate.

Andries


[Now that we are talking anyway, let me ask about something.
You wrote blk_register_region so that subregions override
superregions. At the bottom there is the full region.
Was this just a general good idea, or do you have definite
applications in mind? I ask this mostly because the hash
lookup becomes more complicated in the general case.
You may have noticed that I wrote

static inline int major_to_index(int major)
{
return major % MAX_PROBE_HASH;
}
static inline int dev_to_index(dev_t dev)
{
return major_to_index(MAJOR(dev));
}

and that is OK for regions with constant major.
For multimajor regions a hash does not work very well, and
a tree looks better.]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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