Commit 8dcae1bb authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

closes #5449 merge removal of __attribute__((unpacked)) from ftnode_partition to main

git-svn-id: file:///svn/toku/tokudb@47783 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7f304765
...@@ -173,12 +173,12 @@ enum __attribute__((__packed__)) ftnode_child_tag { ...@@ -173,12 +173,12 @@ enum __attribute__((__packed__)) ftnode_child_tag {
}; };
typedef struct __attribute__((__packed__)) ftnode_child_pointer { typedef struct __attribute__((__packed__)) ftnode_child_pointer {
enum ftnode_child_tag tag;
union { union {
struct sub_block *subblock; struct sub_block *subblock;
struct ftnode_nonleaf_childinfo *nonleaf; struct ftnode_nonleaf_childinfo *nonleaf;
struct ftnode_leaf_basement_node *leaf; struct ftnode_leaf_basement_node *leaf;
} u; } u;
enum ftnode_child_tag tag;
} FTNODE_CHILD_POINTER; } FTNODE_CHILD_POINTER;
...@@ -198,19 +198,14 @@ struct ftnode_disk_data { ...@@ -198,19 +198,14 @@ struct ftnode_disk_data {
// a ftnode partition, associated with a child of a node // a ftnode partition, associated with a child of a node
struct __attribute__((__packed__)) ftnode_partition { struct ftnode_partition {
// the following three variables are used for nonleaf nodes // the following three variables are used for nonleaf nodes
// for leaf nodes, they are meaningless // for leaf nodes, they are meaningless
BLOCKNUM blocknum; // blocknum of child BLOCKNUM blocknum; // blocknum of child
// // How many bytes worth of work was performed by messages in each buffer.
// at any time, the partitions may be in one of the following three states (stored in pt_state): uint64_t workdone;
// PT_INVALID - means that the partition was just initialized
// PT_ON_DISK - means that the partition is not in memory and needs to be read from disk. To use, must read off disk and decompress
// PT_COMPRESSED - means that the partition is compressed in memory. To use, must decompress
// PT_AVAIL - means the partition is decompressed and in memory
//
enum pt_state state; // make this an enum to make debugging easier.
// //
// pointer to the partition. Depending on the state, they may be different things // pointer to the partition. Depending on the state, they may be different things
// if state == PT_INVALID, then the node was just initialized and ptr == NULL // if state == PT_INVALID, then the node was just initialized and ptr == NULL
...@@ -221,13 +216,18 @@ struct __attribute__((__packed__)) ftnode_partition { ...@@ -221,13 +216,18 @@ struct __attribute__((__packed__)) ftnode_partition {
// a struct ftnode_leaf_basement_node for leaf nodes // a struct ftnode_leaf_basement_node for leaf nodes
// //
struct ftnode_child_pointer ptr; struct ftnode_child_pointer ptr;
//
// at any time, the partitions may be in one of the following three states (stored in pt_state):
// PT_INVALID - means that the partition was just initialized
// PT_ON_DISK - means that the partition is not in memory and needs to be read from disk. To use, must read off disk and decompress
// PT_COMPRESSED - means that the partition is compressed in memory. To use, must decompress
// PT_AVAIL - means the partition is decompressed and in memory
//
enum pt_state state; // make this an enum to make debugging easier.
// clock count used to for pe_callback to determine if a node should be evicted or not // clock count used to for pe_callback to determine if a node should be evicted or not
// for now, saturating the count at 1 // for now, saturating the count at 1
uint8_t clock_count; uint8_t clock_count;
// How many bytes worth of work was performed by messages in each buffer.
uint64_t workdone;
}; };
struct ftnode { struct ftnode {
......
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