HAMMER VFS - Fix an edge case in hammer_inode_waitreclaims()
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 16 Mar 2010 17:39:01 +0000 (10:39 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 16 Mar 2010 17:39:01 +0000 (10:39 -0700)
commit858cc00ada5173ec94940260555b52e834027986
treee8fe5899c8efc97f2d9aec3ca24850571352a2aa
parent45139d69b22f48973cf872f55acfc22eb682cc63
HAMMER VFS - Fix an edge case in hammer_inode_waitreclaims()

* Detached inodes can build up in the flusher, causing iqueued/reclaiming
  to increase.  hammer_inode_waitreclaims() is designed to slow down
  the processes responsible (typically a rm -rf) to prevent the backlog
  from blowing out kernel memory.

* hammer_inode_waitreclaims() had a bug where a new pid entry was not
  being placed in the hash table such that it would be properly found
  by the chaining.  Fix this case.

* This fixes an issue where a simultanious rm -rf and (typically) two or
  more directory iterations via ls or find over hundreds of thousands or
  millions of files could cause the number of detached inodes to increase
  in an unbounded fashion.
sys/vfs/hammer/hammer_inode.c