git: sys/vfs/hammer: Properly set mirror_tid on root node split
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Tue Mar 10 06:17:48 PDT 2015
commit f0b930f314d1ccc165af3f9fe5f2512343fc9482
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Tue Mar 10 20:09:36 2015 +0900
sys/vfs/hammer: Properly set mirror_tid on root node split
- Set elms[0].internal.mirror_tid of the new root node
after root split.
- Without this commit elms[0].internal.mirror_tid of the new root
node is 0 which is not appropriate given that its children have
non-zero mirror_tid.
- Submit #2801
- Following hammer show results shows difference.
/* the root node right after root split without this commit */
NODE 8000000020801000 cnt=02 p=0000000000000000 type=I depth=0 mirror 00000001000087a0 fill=z8:65=1% {
G------ ELM 0 L lo=00000000 obj=8000000000000000 rt=00 key=8000000000000000 ot=00
d tids 0000000000000001:0000000000000001 suboff=8000000020800000 mirror 0000000000000000
G------ ELM 1 L lo=00000001 obj=0000000080000209 rt=01 key=0000000000000000 ot=00
tids 0000000100008420:0000000000000000 suboff=8000000020802000 mirror 00000001000087a0
G------ RBN 2 ? lo=ffffffff obj=7fffffffffffffff rt=ffff key=7fffffffffffffff ot=00
tids ffffffffffffffff:0000000000000000 suboff=0000000000000000 mirror 0000000000000000
}
BM NODE 8000000020800000 cnt=32 p=8000000020801000 type=L depth=1 mirror 00000001000087a0 fill=z8:65=1%
...
/* the root node right after root split with this commit */
NODE 8000000020801000 cnt=02 p=0000000000000000 type=I depth=0 mirror 00000001000087a0 fill=z8:65=1% {
G------ ELM 0 L lo=00000000 obj=8000000000000000 rt=00 key=8000000000000000 ot=00
d tids 0000000000000001:0000000000000001 suboff=8000000020800000 mirror 00000001000087a0
G------ ELM 1 L lo=00000001 obj=0000000080000209 rt=01 key=0000000000000000 ot=00
tids 0000000100008420:0000000000000000 suboff=8000000020802000 mirror 00000001000087a0
G------ RBN 2 ? lo=ffffffff obj=7fffffffffffffff rt=ffff key=7fffffffffffffff ot=00
tids ffffffffffffffff:0000000000000000 suboff=0000000000000000 mirror 0000000000000000
}
NODE 8000000020800000 cnt=32 p=8000000020801000 type=L depth=1 mirror 00000001000087a0 fill=z8:65=1% {
...
Summary of changes:
sys/vfs/hammer/hammer_btree.c | 2 ++
1 file changed, 2 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f0b930f314d1ccc165af3f9fe5f2512343fc9482
--
DragonFly BSD source repository
More information about the Commits
mailing list