git: hammer2 - fix I/O race, flesh out bulkfree

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Jan 29 18:29:24 PST 2015


commit d662271e2e8ba195f2d6fc313244e788faec699a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Jan 29 18:26:34 2015 -0800

    hammer2 - fix I/O race, flesh out bulkfree
    
    * Fix an I/O race which could cause hammer2 to block on an iocb forever.
      A TAILQ was being tested outside of a spin-lock and could race the
      related atomic op on the flag.
    
    * Add signal checking for the bulkfree scan, allowing it to be interrupted.
    
    * Loop sbase/sstop to cover the whole volume.  The in-memory bitmap must
      be bzero()d on each loop.

Summary of changes:
 sys/vfs/hammer2/hammer2.h          |   1 +
 sys/vfs/hammer2/hammer2_bulkscan.c | 101 +++++++++++++++++++++++++++++--------
 sys/vfs/hammer2/hammer2_io.c       |   8 ++-
 sys/vfs/hammer2/hammer2_subr.c     |  14 +++++
 4 files changed, 102 insertions(+), 22 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d662271e2e8ba195f2d6fc313244e788faec699a


-- 
DragonFly BSD source repository



More information about the Commits mailing list