HAMMER VFS - Fix I/O invalidation collision assertion
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 1 Feb 2009 06:53:38 +0000 (22:53 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 1 Feb 2009 06:53:38 +0000 (22:53 -0800)
commit1ce12d35b1ca168256fa390c238fd75e231855db
tree9d404831157ce5120630004fc9477733e7f93f17
parent9bf066627ae362591814e78ac2cc84efef54a673
HAMMER VFS - Fix I/O invalidation collision assertion

Fix more issues with the hammer_reserve subsystem.

* Fix a broken base_offset calculation which had reversed the zone
  and offset fields in a HAMMER_ZONE_ENCODE() call.  The broken
  base_offset caused hammer_del_buffers() to scan the wrong offset
  range, leaving conflicting buffer cache buffers intact.

  The resulting conflict caused a KKASSERT(LIST_FIRST(&bp->b_dep) == NULL)
  to fail later on.

* Hold a reference through a potentially blocking operation in
  hammer_blockmap_alloc().

* Record the proper zone in a hammer_reserve() structure created via
  hammer_blockmap_free().  Without this the I/O invalidation code
  cannot locate conflicting hammer_buffer structures.

* hammer_reserve_setdelay_offset() was not actually placing the
  hammer_reserve() structure in the delay queue, allowing it to
  be disposed of too early.
sys/vfs/hammer/hammer_blockmap.c