cvs commit: src/sys/kern vfs_mount.c src/sys/vfs/ufs ffs_inode.c src/sys/vfs/msdosfs msdosfs_denode.c msdosfs_vfsops.c

Matthew Dillon dillon at
Wed Jun 13 19:56:42 PDT 2007

dillon      2007/06/13 19:55:27 PDT

DragonFly src repository

  Modified files:
    sys/kern             vfs_mount.c 
    sys/vfs/ufs          ffs_inode.c 
    sys/vfs/msdosfs      msdosfs_denode.c msdosfs_vfsops.c 
  When getnewvnode() is called the vnode's v_type defaults to VNON.  Syncer
  vnodes are also set to VNON and any vnode that is accessed without locking
  whos v_type is VNON is probably in the middle of being initialized.  For
  this reason the mountlist scan and vflush code typically ignores such
  If a read error occurs while initializing a vnode, in particular if a hash
  collision occurs or an I/O error occurs reading the inode, the vnode's
  v_type was being left set to VNON.  Explicitly set it to VBAD for msdosfs
  and ufs (other FS's probably need the same treatment) so the flush and
  reclaim code can reuse the vnode.
  This fixes 'dangling vnode' panics on unmount for filesystems which incur
  I/O errors, such as when one pulls a USB memory stick out while it is
  still mounted.
  Revision  Changes    Path
  1.28      +2 -4      src/sys/kern/vfs_mount.c
  1.24      +8 -0      src/sys/vfs/ufs/ffs_inode.c
  1.29      +2 -0      src/sys/vfs/msdosfs/msdosfs_denode.c
  1.47      +1 -1      src/sys/vfs/msdosfs/msdosfs_vfsops.c

More information about the Commits mailing list