cvs commit: src/sys/fs/devfs devfs.h devfs_vnops.c src/sys/kern kern_conf.c vfs_subr.c src/sys/sys conf.h vnode.h

Poul-Henning Kamp phk at FreeBSD.org
Tue Feb 22 15:51:08 GMT 2005


phk         2005-02-22 15:51:07 UTC

  FreeBSD src repository

  Modified files:
    sys/fs/devfs         devfs.h devfs_vnops.c 
    sys/kern             kern_conf.c vfs_subr.c 
    sys/sys              conf.h vnode.h 
  Log:
  Reap more benefits from DEVFS:
  
  List devfs_dirents rather than vnodes off their shared struct cdev, this
  saves a pointer field in the vnode at the expense of a field in the
  devfs_dirent.  There are often 100 times more vnodes so this is bargain.
  In addition it makes it harder for people to try to do stypid things like
  "finding the vnode from cdev".
  
  Since DEVFS handles all VCHR nodes now, we can do the vnode related
  cleanup in devfs_reclaim() instead of in dev_rel() and vgonel().
  Similarly, we can do the struct cdev related cleanup in dev_rel()
  instead of devfs_reclaim().
  
          rename idestroy_dev() to destroy_devl() for consistency.
  
          Add LIST_ENTRY de_alias to struct devfs_dirent.
          Remove v_specnext from struct vnode.
          Change si_hlist to si_alist in struct cdev.
          String new devfs vnodes' devfs_dirent on si_alist when
          we create them and take them off in devfs_reclaim().
  
          Fix devfs_revoke() accordingly.  Also don't clear fields
          devfs_reclaim() will clear when called from vgone();
  
          Let devfs_reclaim() call dev_rel() instead of vgonel().
  
          Move the usecount tracking from dev_rel() to devfs_reclaim(),
          and let dev_rel() take a struct cdev argument instead of vnode.
  
          Destroy SI_CHEAPCLONE devices in dev_rel() (instead of
          devfs_reclaim()) when they are no longer used.   (This
          should maybe happen in devfs_close() instead.)
  
  Revision  Changes    Path
  1.21      +1 -0      src/sys/fs/devfs/devfs.h
  1.104     +17 -16    src/sys/fs/devfs/devfs_vnops.c
  1.172     +11 -13    src/sys/kern/kern_conf.c
  1.585     +0 -2      src/sys/kern/vfs_subr.c
  1.211     +3 -2      src/sys/sys/conf.h
  1.283     +2 -6      src/sys/sys/vnode.h


More information about the cvs-src mailing list