HEADSUP: linux dev_t emulation

From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 03/10/05

  • Next message: Christoph Hellwig: "Re: HEADSUP: linux dev_t emulation"
    To: arch@freebsd.org
    Date: Thu, 10 Mar 2005 22:11:44 +0100
    
    

    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.
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Christoph Hellwig: "Re: HEADSUP: linux dev_t emulation"
  • Quantcast