venti/copy: no rewriting unless rewrite flag is set (Nathaniel W Filardo)
This commit is contained in:
parent
ee85defda4
commit
fd0a0b2a62
1 changed files with 4 additions and 2 deletions
|
|
@ -55,6 +55,7 @@ walk(uchar score[VtScoreSize], uint type, int base)
|
||||||
}
|
}
|
||||||
walk(root.score, VtDirType, 0);
|
walk(root.score, VtDirType, 0);
|
||||||
walk(root.prev, VtRootType, 0);
|
walk(root.prev, VtRootType, 0);
|
||||||
|
if(rewrite)
|
||||||
vtrootpack(&root, buf); /* walk might have changed score */
|
vtrootpack(&root, buf); /* walk might have changed score */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -67,6 +68,7 @@ walk(uchar score[VtScoreSize], uint type, int base)
|
||||||
if(!(e.flags & VtEntryActive))
|
if(!(e.flags & VtEntryActive))
|
||||||
continue;
|
continue;
|
||||||
walk(e.score, e.type, e.type&VtTypeBaseMask);
|
walk(e.score, e.type, e.type&VtTypeBaseMask);
|
||||||
|
if(rewrite)
|
||||||
vtentrypack(&e, buf, i);
|
vtentrypack(&e, buf, i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue