Re: [PATCH] dm update 2/3

Alexander Viro (viro@math.psu.edu)
Tue, 29 Oct 2002 12:39:51 -0500 (EST)


On Tue, 29 Oct 2002, Joe Thornber wrote:

> - major(dev), minor(dev),
> + dm_major(hc->md), dm_minor(hc->md),

> - param->dev = kdev_t_to_nr(dm_kdev(md));
> + param->dev = MKDEV(dm_major(md), dm_minor(md));

> +int dm_major(struct mapped_device *md);
> +int dm_minor(struct mapped_device *md);

*blam*

Please, don't expose major/minor split. devfs inisisting on separately
passed major/minor is bad enough, no need to compound that crap.

->major and ->first_minor are about to be glued into a single field
anyway and devfs_register() will either switch to dev_t or get wrapper
taking dev_t.

Please, just do dm_disk(dm) and for now use its ->major/->first_minor.

Another thing on cards is the list of block_device over given gendisk -
that kills a bunch of bogus bdget() uses, so the second instance will
disappear completely.

-
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/