HAMMER VFS - Hack cursor iterator when unlocked cursor moved to parent
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 14 Mar 2010 05:16:38 +0000 (21:16 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 14 Mar 2010 05:16:38 +0000 (21:16 -0800)
commit6dc17446feb14cbca471e4eecf2519d215f5054d
treeb87ff9e9141427cf4c3c014ebee0563511be1298
parenta5687efd48ac4b60d9d87ab1157fb548a5f69c82
HAMMER VFS - Hack cursor iterator when unlocked cursor moved to parent

* It is possible to reverse-index a cursor while it is unlocked due to
  a node deletion moving cursors on that node to the parent, and a
  subsequent insertion then inserting new elements between the cursor's
  current position and its expected iteration range.

* Detect the case with a new flag (hack!) HAMMER_CURSOR_ITERATE_CHECK
  and just iterate past the elements outside the iteration range in
  this case.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_cursor.c
sys/vfs/hammer/hammer_cursor.h