sbin/hammer: Don't use the same buffer for blockmap layer1 and layer2
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 11 Mar 2015 23:30:30 +0000 (08:30 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 12 Mar 2015 15:40:44 +0000 (00:40 +0900)
commit365b488c78f50d8c852703c59559f0593e1a6c96
tree54a83bb8d857ac70eb45ec312312062f3c361514
parent66086a39274fedbbde236b9d1d4e88d0d59b2fdf
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).
sbin/hammer/blockmap.c
sbin/hammer/ondisk.c