HAMMER VFS - More cluster_read() fixes
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 22 Aug 2010 04:20:04 +0000 (21:20 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 22 Aug 2010 04:20:04 +0000 (21:20 -0700)
commitb7de8aa5d2a719f4270304c8e45d7b24e169ffe0
tree163d119b3d84829b9287ea07cddebc1f700e41ec
parent073629bbd16495c96894558012ab1f26d9b757c8
HAMMER VFS - More cluster_read() fixes

* The recent cluster limiting code was improperly using raw block device
  offsets to calculate the largeblock mask used to prevent clustered I/Os
  from crossing a large-block boundary.

  raw block device offsets are not necessarily largeblock aligned, so
  this calculation failed to properly limit cluster_read()s and the
  result was an occassional clustered read would cross-over into an
  incompatible largeblock and later cause an overlapping buffer panic.

* Calculate the proper limit in the hammer_ondisk.c module and refactor
  hammer_io_read().

Reported-by: swildner
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_ondisk.c