sheep: change accessing of inode->data_vdi_id[] to function

We need to modify all the direct accessing of data_vdi_id[] to common function
because the following change of index in inode.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: replace structure of inode->data_vdi_id[] from array to btree

1. add basic {dog,sheep,sheepfs}_bnode_{reader,writer} function for b-tree to read/write node
2. add sd_extent_header to manage meta-data in data_vdi_id[] or middle-node
3. add new type of object: B-tree object as middle-node

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: modify interface to write inode meta data

After changing inode->data_vdi_id[] from array to B-tree, we can't write
vid to data_vdi_id[] directly now. So we need to add new interface
sd_inode_write_vid() to update index of inode.

It will clear all object_cache if use direct=true, so we use direct=false
to write middle-node object.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: extend MAX number of objects

Add the max number of objects and add new MACRO for index of inode.
Add store_policy into 'struct vdi_iocq' and 'struct sd_req'

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: upgrade 'idx' in object_cache from 32bit to 64bit

Change 'idx' in object cache from uint32_t to uint64_t for working correctly
on hyper volume.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: add traverse_btree() to list and check vdi

Add framework about traverse of B-tree for vdi_list() and vdi_check()

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: use callback to implement fill_object_tree() and delete_one() for hyper volume

For fill_object_tree() and delete_one() to support hyper volume by using traverse_btree()

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: copy middle-node when vdi_clone() for hyper volume

Copy all middle-nodes when clone a hyper volume.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: support erasure code

Change is_erasure_obj(), is_erasure_oid() and get_store_objsize() in sheep and dog
to deal with erasure-code for hyper volume.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: add functional test case for hyper volume

Add test case for writing, reading and recovery of hyper volume.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>