git: sys/vfs/hammer: Fix and add comments on btree
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Sat Mar 7 17:38:56 PST 2015
commit 2f49d4c50cae1d6a1370f18b922893f7d87b9b17
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Sun Mar 8 07:46:49 2015 +0900
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.
Summary of changes:
sys/vfs/hammer/hammer_btree.c | 16 +++-------------
sys/vfs/hammer/hammer_btree.h | 3 ++-
2 files changed, 5 insertions(+), 14 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2f49d4c50cae1d6a1370f18b922893f7d87b9b17
--
DragonFly BSD source repository
More information about the Commits
mailing list