[PATCH] remove MAX_BLKDEV from genhd.c
Patch from Andries.Brouwer@cwi.nl A patch for genhd.c: - removed outdated comments - removed MAX_BLKDEV In genhd.c the variable MAX_BLKDEV was only the size of a hash table, so I made it MAX_PROBE_HASH. It can be 1, or 23, or 256, or whatever one wants. Note that the current setup requires that every device number in a given range is mapped by dev_to_index() to the same index in the hash table, so this routine will have to be adapted in case one wants to register multimajor ranges. Discussion is possible about whether struct blk_probe needs a dev_t or a kdev_t, but I left things this time. If a range can end at precisely the end of [k]dev_t space, the old code was wrong since (p->dev + p->range) would be 0. That is why "p->dev + p->range <= dev" was replaced by "p->dev + p->range - 1 < dev".
Showing
Please register or sign in to comment