sys/vfs/hammer: Fix and add comments on btree
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 7 Mar 2015 22:46:49 +0000 (07:46 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 8 Mar 2015 01:29:28 +0000 (10:29 +0900)
commit2f49d4c50cae1d6a1370f18b922893f7d87b9b17
tree75d885aa499dee1c4b1c1d7cf6ef12485a11c57f
parentb7fb31a197a4fe32032bcdeb4b9ceb0cd605d77a
sys/vfs/hammer: Fix and add comments on btree

- hunk1-2: These two seem to be old ones. At this point *node is
  a pointer to cursor->node->ondisk which is not invalid or stale.

- hunk3: This isn't necessary since now this function just returns
  EINVAL if the cursor's node is internal. It didn't have this check
  when this comment was written.

- hunk4: It's hammer_btree_lookup() that could return ENOSPC when
  no space is available, but not this function. Moving this comment
  to the previous paragraph makes better sense.

- hunk5: Leaf nodes have no idea of boundaries to start with so
  replace it with the comment being used in hammer_btree_delete()
  which also deals with bcopy() of elements.

- hunk6: Fix a typo.

- hunk7: Refer to a leaf node's count in addition to internal node.
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_btree.h