Currently, we store the list of VDIs in a single object (a single file), aka, the super object. It has two disadvanges: - We use the ext2 directory format to store the list of VDIs. It doesn't perform well with lots of VDIs. We must implement a clever format like btree as modern file systems do (xfs, btrfs, etc). - We need the data of a single write system call to be applied to the super object in the "all or nothing" way. We can't with commonly used file systems in production (ext3, xfs, etc). So this patchset stores VDI information in directories like this: ./vdi ./vdi/linux ./vdi/linux/0000000000080000-4b2f0541 ./vdi/linux/0000000000040000-00000000 ./vdi/linux2 ./vdi/linux2/00000000000c0000-00000000 'linux' and 'linux2' are vdi names. 'linux' vdi has one snapshot. '0000000000080000-4b2f0541' is the combination of the oid of the vdi object and its tag. Note that we'll change the format. The major disadvantage is that we can't handle the super object in the same way as we handle other objects, e.g., we need different code to synchronize diretories on two hosts. I wrote the code to see how it works but we aren't sure about which approaches is better yet. This is against the current git head: commit bb6dea72bfc8d89bac91d1d55a8af9ca08d49391 Author: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> Date: Wed Dec 16 08:52:45 2009 +0900 = collie/collie.h | 6 +- collie/group.c | 18 +--- collie/net.c | 6 + collie/store.c | 328 ++++++++++++++++++++++++++++++++++++++++++++-- collie/vdi.c | 202 ++++++++++------------------- include/meta.h | 9 -- include/net.h | 4 + include/sheepdog_proto.h | 36 +++++- lib/net.c | 51 +++++++ shepherd/shepherd.c | 11 +- 10 files changed, 492 insertions(+), 179 deletions(-) |