git: sbin/hammer: Don't use the same buffer for blockmap layer1 and layer2

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Thu Mar 12 08:59:19 PDT 2015


commit 365b488c78f50d8c852703c59559f0593e1a6c96
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Thu Mar 12 08:30:30 2015 +0900

    sbin/hammer: Don't use the same buffer for blockmap layer1 and layer2
    
    - Functions that lookup blockmap layer1 and layer2 should use
      different buffer variable (set to NULL) for each get_buffer_data()
      call to retrieve ondisk data unless isnew flag is set to 1.
    
    - From the way newfs_hammer allocates layer entries on disks,
      any given layer1 entry and layer2 entry are never both cached in
      a single hammer buffer. Passing layer1 buffer to get_buffer_data()
      as a cache for layer2 happens to be overhead as it takes extra cache
      boundary check (and we know layer2 isn't cached in layer1 buffer).

Summary of changes:
 sbin/hammer/blockmap.c | 13 ++++++++-----
 sbin/hammer/ondisk.c   | 14 ++++++++------
 2 files changed, 16 insertions(+), 11 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/365b488c78f50d8c852703c59559f0593e1a6c96


-- 
DragonFly BSD source repository



More information about the Commits mailing list