Fix a double-flush which was occuring for every unlinked inode, resulting
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 23 Sep 2008 22:28:56 +0000 (22:28 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 23 Sep 2008 22:28:56 +0000 (22:28 +0000)
commit35a4994458ae9f10e1baeb2ba8c24d7dd1586163
treeb2dd5708b3fc7c6666ed9a986fcff39f019fb129
parent21fde338acc9f79a41d32f22eaa801d5330f34c7
Fix a double-flush which was occuring for every unlinked inode, resulting
in very inefficient flushing operations which also prevented any inode from
being reclaimed until the entire flush batch (which could be upwards of 40,000
inodes) completed.

The double-flush was caused by the HAMMER_INODE_DELETING flag being
improperly set twice.

Clear the HAMMER_INODE_REFLUSH flag if a reflush was queued but the
modmask is cleared by the prior flush.

Adjust the directory mtime before flushing an underlying inode, avoiding
a double flush of the directory inode.

Reported-by: Hasso Tepper <hasso@estpak.ee>
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_vnops.c