object cache: fix bmap calculation

It uses 64 bits to represent 4M objects, so each bits will represent 64K data
or object_cache_flush_and_delete() will fail.

- add two eprintf for read/write_cache_object()
sheepfs: modify configure file to work with sheepfs
sheep: move strbuf and rmdir_t into lib

Those are needed by sheepfs.
sheepfs: core infrastructure

Sheepfs is FUSE-based pseudo file system in userland to access both sheepdog's
internal state (for e.g, cluster info, vdi list) as well as sheepdog's high
reliable stroage.

This building block is supposed to be modular enough to allow us ease adding
more powerful tools.
sheepfs: add 'cluster' entry

This export cluster state as collie cluster command.

You can read the those info by simply ordinary read/write. For e.g,

tailai.ly@taobao:~/sheepdog$ cat sheepfs_dir/cluster/info 
Cluster status: running

Cluster created at Mon May 14 15:45:37 2012

Epoch Time           Version
2012-05-14 15:45:38      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
sheepfs: add 'vdi' entry

Support 'collie vdi list', mount & unmount (used by volume)
sheepfs: implement shadow file mechanism

Sheepfs use this shadow file mechanism to mostly manage dentries. We
might also make use of those shadow file to cache non-volatile states.
sheepfs: add 'volume' entry

This is where we can access sheepdog's storage from well received 'file'
abstraction. All the attatched volume will be seen as a file in volume
directory.

To attatch a volume:
echo test > sheepfs_dir/vdi/mount

Then you will see a file entry in sheepfs_dir/volume/test, which you can do
the tricks you are fond of. For, e.g, we can boot an sheepdog image as normally
as for an ordinary raw image:

$ qemu-system-x86_64 --enable-kvm -m 1024 -drive \
  file=sheepfs_dir/volume/test,cache=writeback.

This file abstraction integrates well with kernel's other component such as
pagecache.
sheepfs: implement 'sync' operation for volumes

When we use page cache to cache vdi in sheepdog storage, we need sync operation
to flush dirty bits back into sheep storage. This is wired up to the 'writeback'
of the kernel's page cache.
sheepfs: implement 'open' operation

This is useful to control whether we use page cache or not.
sheepfs: teach volumes to unmount

This is how we can deattach the volumes from sheep cluster storage.

Usage:
echo vdi_name > sheepfs_dir/vdi/unmount
sheepfs: add 'node' entry

Support vdi node list & info.
sheepfs: add a socket pool to speedup connection

Socket pool is used for FUSE read threads, which use threads to simulate aysnc
read. All sockets point to the same gateway.

- add a read/write lock to be thead safe.
- add an option to dis/enable page cache for volumes.
sheepfs: add options to pass the address and port of the sheep
sheepfs: teach volume to read/write COW objects

Now we can opreate on the volume with cloned vdi, for e.g, we can boot up vdi
named of 'clone' by below command:

$ qemu-system-x86_64 --enable-kvm -m 1024 -drive \
  file=sheepfs_dir/volume/clone,cache=writeback

tailai.ly@taobao:~/sheepdog$ cat sheepfs_dir/vdi/list 
  Name        Id    Size    Used  Shared    Creation time   VDI id  Tag
c clone        1   20 MB  0.0 MB   20 MB 2012-05-14 12:01   72a1e2  
s test1        1   20 MB   20 MB  0.0 MB 2012-05-14 11:57   fd32fc  snap
  test1        2   20 MB  0.0 MB   20 MB 2012-05-14 11:58   fd32fd  

- add an option to disable 'object cache' for volumes
sheepfs: add config entry

config exports internal state of sheepfs and enable us even to change those
state on the fly.

For e.g, control over which sheep to connect:
echo 192.168.10.113:7000 > sheepfs_dir/config/sheep_info