HAMMER VFS - Limit recursion for long directory chains, update mtime/ctime
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 7 May 2009 00:05:09 +0000 (17:05 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 7 May 2009 00:05:09 +0000 (17:05 -0700)
commitcc0758d09df08626d04a45be55bf80ceef7ef1bd
tree9c060cdc08e2285466e9850a395fcdc1292ffa37
parentd7c75c7a20590cab729c3d653aaa91a4960d6165
HAMMER VFS - Limit recursion for long directory chains, update mtime/ctime

A long chain of directory dependencies can blow out the kernel stack.  Limit
the recursion to 20 levels.  If the depth is exceeded the flushing of the
deep inodes is delayed until the higher dependencies are taken care of.

Update mtime/ctime accordingly based on the fstest stress test from FreeBSD.
Note however that we cannot update the ctime on directories for file creates,
renames, and deletes within the directory without rolling a new inode,
which is too expensive to do for that situation.  We can, and do, update the
mtime.
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_vnops.c