Commit 784f2e83 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4875], move toku_calculate_root_offset_pointer to brt_header.c

git-svn-id: file:///svn/toku/tokudb@43457 c7de825b-a66e-492c-adef-691d508d4ae1
parent f5bc02fe
......@@ -392,7 +392,7 @@ struct brt_header {
TXNID root_xid_that_created;
struct toku_list live_brts;
OMT txns; // transactions that are using this header
bool pinned_by_checkpoint; //Keep this heaer around for checkpoint, like a transaction
bool pinned_by_checkpoint; //Keep this header around for checkpoint, like a transaction
brt_compare_func compare_fun;
brt_update_func update_fun;
......@@ -541,7 +541,6 @@ extern int toku_brtnode_pe_callback (void *brtnode_pv, PAIR_ATTR old_attr, PAIR_
extern BOOL toku_brtnode_pf_req_callback(void* brtnode_pv, void* read_extraargs);
int toku_brtnode_pf_callback(void* brtnode_pv, void* UU(disk_data), void* read_extraargs, int fd, PAIR_ATTR* sizep);
extern int toku_brtnode_cleaner_callback( void *brtnode_pv, BLOCKNUM blocknum, u_int32_t fullhash, void *extraargs);
extern CACHEKEY* toku_calculate_root_offset_pointer (struct brt_header* h, u_int32_t *root_hash);
static inline CACHETABLE_WRITE_CALLBACK get_write_callbacks_for_node(struct brt_header* h) {
CACHETABLE_WRITE_CALLBACK wc;
......
......@@ -2567,11 +2567,6 @@ static void push_something_at_root (struct brt_header *h, BRTNODE *nodep, BRT_MS
}
}
CACHEKEY* toku_calculate_root_offset_pointer (struct brt_header* h, u_int32_t *roothash) {
*roothash = toku_cachetable_hash(h->cf, h->root_blocknum);
return &h->root_blocknum;
}
int
toku_brt_root_put_cmd (struct brt_header *h, BRT_MSG_S * cmd)
// Effect:
......@@ -3184,7 +3179,7 @@ int toku_update_descriptor(struct brt_header * h, DESCRIPTOR d, int fd)
{
int r = 0;
DISKOFF offset;
//4 for checksum
// 4 for checksum
toku_realloc_descriptor_on_disk(h->blocktable, toku_serialize_descriptor_size(d)+4, &offset, h);
r = toku_serialize_descriptor_contents_to_fd(fd, d, offset);
if (r) {
......
......@@ -873,3 +873,9 @@ toku_brtheader_remove_txn_ref(struct brt_header* h, TOKUTXN txn) {
}
}
CACHEKEY* toku_calculate_root_offset_pointer (struct brt_header* h, u_int32_t *roothash) {
*roothash = toku_cachetable_hash(h->cf, h->root_blocknum);
return &h->root_blocknum;
}
......@@ -58,5 +58,6 @@ toku_brtheader_maybe_add_txn_ref(struct brt_header* h, TOKUTXN txn);
void
toku_brtheader_remove_txn_ref(struct brt_header* h, TOKUTXN txn);
CACHEKEY* toku_calculate_root_offset_pointer (struct brt_header* h, u_int32_t *root_hash);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment