:You can mmap() devices  and you can mmap files..
:
:you cannot mmap FIFOs or sockets.
:
:for this reason I think that devices are still well represented by
:vnodes. If we merged vnodes and vm objects,
:then if devices were not vnodes, how would you represent
:a vm area that maps a device?
:
:-- 
:      __--_|\  Julian Elischer

    I think the crux of the issue here is that most devices just don't
    need the baggage of a vnode and many don't need the baggage of a VM
    object except possibly for mmap().  A fileops interface would be the
    cleanest way to implement a wide range of devices.

    Lets compare our various function dispatch structures.  It's quite
    obvious to me that we can merge cdevsw and fileops and remove all
    vnode references from most of our devices.  Ok, maybe not /dev/tty...
    but most of the rest surely!  We would also want to have an optional
    vnode pointer in the fileops (like we do now) which 'enables' the
    additional VOP operations on that file descriptor (in this case the
    fileops for read, write, etc... would point to VOP wrappers like they
    do now), and of course we would need an opaque pointer for use by
    the fileops (devices would most likely load their cdev reference into
    it).

                cdevsw  fileops vfsops VOPs

    OPEN          X       -       -     X
    CLOSE         X       X       -     X
    READ          X       X       -     X
    WRITE         X       X       -     X
    IOCTL         X       X       -     -
    POLL          X       X       -     X
    MMAP          X       -       -     X
    STRATEGY      X       -       -     X
    DUMP          X       -       -     -

    KQFILTER      -       X       -     X
    STAT          -       X       -     -

    NAME          X       -       -     -
    MAJ           X       -       -     -
    PSIZE         X       -       -     -
    FLAGS         X       -       -     -
    BMAJ          X       -       -     -


    ADVLOCK       -       -       -     X
    BWRITE        -       -       -     X
    FSYNC         -       -       -     X
    ISLOCKED      -       -       -     X
    LEASE         -       -       -     X
    LOCK          -       -       -     X
    PATHCONF      -       -       -     X
    READLINK      -       -       -     X
    REALLOCBLKS   -       -       -     X
    REVOKE        -       -       -     X
    UNLOCK        -       -       -     X
    BMAP          -       -       -     X
    PRINT         -       -       -     X
    BALLOC        -       -       -     X
    GETPAGES      -       -       -     X
    PUTPAGES      -       -       -     X
    FREEBLKS      -       -       -     X
    GETACL        -       -       -     X
    SETACL        -       -       -     X
    ACLCHECK      -       -       -     X
    GETEXTATTR    -       -       -     X
    SETEXTATTR    -       -       -     X
    LOOKUP        -       -       -     X
    CACHEDLOOKUP  -       -       -     X
    CREATE        -       -       -     X
    WHITEOUT      -       -       -     X
    MKNOD         -       -       -     X
    ACCESS        -       -       -     X
    GETATTR       -       -       -     X
    SETATTR       -       -       -     X
    REMOVE        -       -       -     X
    LINK          -       -       -     X
    RENAME        -       -       -     X
    MKDIR         -       -       -     X
    RMDIR         -       -       -     X
    SYMLINK       -       -       -     X
    READDIR       -       -       -     X
    INACTIVE      -       -       -     X
    RECLAIM       -       -       -     X

    MOUNT         -       -       X     -
    START         -       -       X     -
    UNMOUNT       -       -       X     -
    ROOT          -       -       X     -
    QUOTACTL      -       -       X     -
    STATFS        -       -       X     -
    SYNC          -       -       X     -
    VGET          -       -       X     -
    FHTOVP        -       -       X     -
    CHECKEXP      -       -       X     -
    VPTOFH        -       -       X     -
    INIT          -       -       X     -
    UNINIT        -       -       X     -
    EXTATTRCTL    -       -       X     -

                                        -Matt



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to