Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Apr 2011 10:47:56 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/ufs/ffs ffs_alloc.c src/sys/ufs/ufs ufs_extern.h ufs_inode.c
Message-ID:  <201104241048.p3OAmA30006172@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2011-04-24 10:47:56 UTC

  FreeBSD src repository

  Modified files:
    sys/ufs/ffs          ffs_alloc.c 
    sys/ufs/ufs          ufs_extern.h ufs_inode.c 
  Log:
  SVN rev 220985 on 2011-04-24 10:47:56Z by kib
  
  VFS sometimes is unable to inactivate a vnode when vnode use count
  goes to zero. E.g., the vnode might be only shared-locked at the time of
  vput() call. Such vnodes are kept in the hash, so they can be found later.
  
  If ffs_valloc() allocated an inode that has its vnode cached in hash, and
  still owing the inactivation, then vget() call from ffs_valloc() clears
  VI_OWEINACT, and then the vnode is reused for the newly allocated inode.
  
  The problem is, the vnode is not reclaimed before it is put to the new
  use. ffs_valloc() recycles vnode vm object, but this is not enough.
  In particular, at least v_vflag should be cleared, and several bits of
  UFS state need to be removed.
  
  It is very inconvenient to call vgone() at this point. Instead, move
  some parts of ufs_reclaim() into helper function ufs_prepare_reclaim(),
  and call the helper from VOP_RECLAIM and ffs_valloc().
  
  Reviewed by:    mckusick
  Tested by:      pho
  MFC after:      3 weeks
  
  Revision  Changes    Path
  1.164     +2 -1      src/sys/ufs/ffs/ffs_alloc.c
  1.59      +1 -0      src/sys/ufs/ufs/ufs_extern.h
  1.74      +28 -22    src/sys/ufs/ufs/ufs_inode.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104241048.p3OAmA30006172>