freebsd-dev/sys/ufs
Kirk McKusick bd4bd019fb 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.
2000-11-14 09:00:25 +00:00
..
ffs When deleting a file, the ordering of events imposed by soft updates 2000-11-14 09:00:25 +00:00
ifs Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing 2000-10-29 14:54:55 +00:00
mfs Add VOP_*VOBJECT vops, because MFS requires explicit vop specification. 2000-09-12 16:21:16 +00:00
ufs Fixed breakage of mknod() in rev.1.48 of ext2_vnops.c and rev.1.126 of 2000-11-04 08:10:56 +00:00