Date: Thu, 10 Mar 2005 22:11:44 +0100 From: Poul-Henning Kamp <phk@phk.freebsd.dk> To: arch@freebsd.org Subject: HEADSUP: linux dev_t emulation Message-ID: <5044.1110489104@critter.freebsd.dk>
next in thread | raw e-mail | index | archive | help
Linux has only 8 bit major + 8 bit minor dev_t. We have 8 bit major + 24 bit dev_t. Obviously, a Linux dev_t cannot be guaranteed to represent a FreeBSD dev_t correctly. This used to be a bigger problem because disk partitions used the upper bit of the minor. Then it became less of a problem because GEOM numbered from the bottom at all times. Now it _may_ be even less of a problem because the FreeBSD dev_t is now bottom allocated all over. BUT! That still doesn't change the disparity in size, a fact we need to keep in mind. Any Linux program which depends on specific major/minor numbers will have to be dealt with in some magic manner, I have no idea which. I have diked out a lot of code in my development tree and it will need to get fixed properly before it can work in the new world order. The main difference is that when looking up a cdev from a dev_t, a reference will be gained which must be dropped again. Whoever is working on Linux emulation should start looking at p4::phk_bufwork now. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5044.1110489104>
