diff --git a/newbrt/brt-test.c b/newbrt/brt-test.c index 48b5281de17..2de1acecdc9 100644 --- a/newbrt/brt-test.c +++ b/newbrt/brt-test.c @@ -252,11 +252,11 @@ static void test_multiple_files_of_size (int size) { snprintf(val, 100, "Val%d", i); brt_insert(t1, fill_dbt(&k, key, 1+strlen(key)), fill_dbt(&v, val, 1+strlen(val)), null_db, null_txn); } - //verify_brt(t0); + //toku_verify_brt(t0); //dump_brt(t0); //dump_brt(t1); - verify_brt(t0); - verify_brt(t1); + toku_verify_brt(t0); + toku_verify_brt(t1); r = close_brt(t0); assert(r==0); r = close_brt(t1); assert(r==0); @@ -508,7 +508,7 @@ static void test_read_what_was_written (void) { assert(strcmp(v.data,"there")==0); } - assert(verify_brt(brt)==0); + assert(toku_verify_brt(brt)==0); /* Now put a bunch (NVALS) of things in. */ { @@ -519,12 +519,12 @@ static void test_read_what_was_written (void) { snprintf(key, 100, "key%d", i); snprintf(val, 100, "val%d", i); if (i<600) { - int verify_result=verify_brt(brt);; + int verify_result=toku_verify_brt(brt);; assert(verify_result==0); } brt_insert(brt, fill_dbt(&k, key, strlen(key)+1), fill_dbt(&v, val, strlen(val)+1), null_db, null_txn); if (i<600) { - int verify_result=verify_brt(brt); + int verify_result=toku_verify_brt(brt); if (verify_result) { dump_brt(brt); assert(0); @@ -549,7 +549,7 @@ static void test_read_what_was_written (void) { printf("Now read them out\n"); //show_brt_blocknumbers(brt); - verify_brt(brt); + toku_verify_brt(brt); //dump_brt(brt); /* See if we can read them all out again. */ diff --git a/newbrt/brt-verify.c b/newbrt/brt-verify.c index 09dbfbc1393..c447ac20083 100644 --- a/newbrt/brt-verify.c +++ b/newbrt/brt-verify.c @@ -53,7 +53,7 @@ static void verify_parent_fingerprint (BRTNODE node) { } } -int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode) { +int toku_verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode) { int result=0; BRTNODE node; void *node_v; @@ -106,7 +106,7 @@ int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, byteve if (hirange) assert(toku_keycompare(node->u.n.childkeys[i-1], node->u.n.childkeylens[i-1], hirange, hilen)<=0); } if (recurse) { - result|=verify_brtnode(brt, node->u.n.children[i], + result|=toku_verify_brtnode(brt, node->u.n.children[i], (i==0) ? lorange : node->u.n.childkeys[i-1], (i==0) ? lolen : node->u.n.childkeylens[i-1], (i==node->u.n.n_children-1) ? hirange : node->u.n.childkeys[i], @@ -120,7 +120,7 @@ int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, byteve return result; } -int verify_brt (BRT brt) { +int toku_verify_brt (BRT brt) { int r; CACHEKEY *rootp; if ((r = toku_read_and_pin_brt_header(brt->cf, &brt->h))) { @@ -128,7 +128,7 @@ int verify_brt (BRT brt) { return r; } rootp = toku_calculate_root_offset_pointer(brt); - if ((r=verify_brtnode(brt, *rootp, 0, 0, 0, 0, 1, null_brtnode))) goto died0; + if ((r=toku_verify_brtnode(brt, *rootp, 0, 0, 0, 0, 1, null_brtnode))) goto died0; if ((r = toku_unpin_brt_header(brt))!=0) return r; return 0; } diff --git a/newbrt/brt.c b/newbrt/brt.c index 813b0f3b09c..b057c068694 100644 --- a/newbrt/brt.c +++ b/newbrt/brt.c @@ -1941,7 +1941,7 @@ int brt_delete(BRT brt, DBT *key, DB *db) { return r; } -int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode); +int toku_verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode); int dump_brtnode (BRT brt, DISKOFF off, int depth, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, BRTNODE parent_brtnode) { int result=0; @@ -1953,7 +1953,7 @@ int dump_brtnode (BRT brt, DISKOFF off, int depth, bytevec lorange, ITEMLEN lole printf("%s:%d pin %p\n", __FILE__, __LINE__, node_v); node=node_v; node->parent_brtnode = parent_brtnode; - result=verify_brtnode(brt, off, lorange, lolen, hirange, hilen, 0, parent_brtnode); + result=toku_verify_brtnode(brt, off, lorange, lolen, hirange, hilen, 0, parent_brtnode); printf("%*sNode=%p\n", depth, "", node); if (node->height>0) { printf("%*sNode %lld nodesize=%d height=%d n_children=%d n_bytes_in_hashtables=%d keyrange=%s %s\n", diff --git a/newbrt/brt.h b/newbrt/brt.h index 8c07d6e10be..14a96313b31 100644 --- a/newbrt/brt.h +++ b/newbrt/brt.h @@ -43,7 +43,7 @@ void brt_flush (BRT); /* fsync and clear the caches. */ int brt_create_cachetable(CACHETABLE *t, long cachesize, LSN initial_lsn, TOKULOGGER); extern int brt_debug_mode; -int verify_brt (BRT brt); +int toku_verify_brt (BRT brt); int show_brt_blocknumbers(BRT);