Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2000 01:00:25 -0800 (PST)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ufs/ffs ffs_softdep.c
Message-ID:  <200011140900.BAA91171@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
mckusick    2000/11/14 01:00:25 PST

  Modified files:
    sys/ufs/ffs          ffs_softdep.c 
  Log:
  When deleting a file, the ordering of events imposed by soft updates
  is to first write the deleted directory entry to disk, second write
  the zero'ed inode to disk, and finally to release the freed blocks
  and the inode back to the cylinder-group map. As this ordering
  requires two disk writes to occur which are normally spaced about
  30 seconds apart (except when memory is under duress), it takes
  about a minute from the time that a file is deleted until its inode
  and data blocks show up in the cylinder-group map for reallocation.
  If a file has had only a brief lifetime (less than 30 seconds from
  creation to deletion), neither its inode nor its directory entry
  may have been written to disk. If its directory entry has not been
  written to disk, then we need not wait for that directory block to
  be written as the on-disk directory block does not reference the
  inode. Similarly, if the allocated inode has never been written to
  disk, we do not have to wait for it to be written back either as
  its on-disk representation is still zero'ed out. Thus, in the case
  of a short lived file, we can simply release the blocks and inode
  to the cylinder-group map immediately. As the inode and its blocks
  are released immediately, they are immediately available for other
  uses. If they are not released for a minute, then other inodes and
  blocks must be allocated for short lived files, cluttering up the
  vnode and buffer caches. The previous code was a bit too aggressive
  in trying to release the blocks and inode back to the cylinder-group
  map resulting in their being made available when in fact the inode
  on disk had not yet been zero'ed. This patch takes a more conservative
  approach to doing the release which avoids doing the release prematurely.
  
  Revision  Changes    Path
  1.75      +19 -16    src/sys/ufs/ffs/ffs_softdep.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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