hammer util: avoid running concurrent cleanups
authorSimon Schubert <simon.schubert@epfl.ch>
Tue, 4 Aug 2009 14:23:57 +0000 (16:23 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Sun, 9 Aug 2009 08:32:25 +0000 (10:32 +0200)
commit5bd5f172451bff7c7aea85c80d7e60b825fcd742
tree01fdb59f62118e627e7c82c794d9cbd05ef584aa
parent86f860a7a40e2047fd04500e4d197fca68525962
hammer util: avoid running concurrent cleanups

If hammer cleanup gets called more frequently than the cleanup runs
take, they build up, all trying to run in parallel.  Prevent this by
locking the config file while cleanup is running.  If cleanup finds the
config file locked for a PFS, it will skip processing.
sbin/hammer/cmd_cleanup.c