git: sys/vfs/hammer: Erase layer2 entries on removing volume

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Mon Mar 21 13:36:32 PDT 2016


commit c7fc3243262be620521d3c0d0c40c8385ad5c226
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Mar 21 01:31:48 2016 +0900

    sys/vfs/hammer: Erase layer2 entries on removing volume
    
    Since hammer volume-del puts layer1 entries back to UNAVAIL,
    it should zero clear layer2 entries within those layer1s.
    We basically want to get rid of all meta data that belonged
    to this volume, not just volume header and layer1 entries.
    
    (Layer2 entries in this volume become unreachable data after
    layer1 entries lose an offset to layer2s thus should be zero
    cleared.)
    
    This commit makes this function look redundant with two full
    loops of layer1/2, but this is what's necessary and makes it
    more readable plus easier to conform to the original design
    than having for-loop function with callback handlers.
    
    Also see d8d6680 and de75bb2.

Summary of changes:
 sys/vfs/hammer/hammer_volume.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list