[Sheepdog] [PATCH 3/3] sheep: fix nr_copies in vdi.c
MORITA Kazutaka
morita.kazutaka at gmail.com
Tue May 1 18:50:21 CEST 2012
At Tue, 01 May 2012 21:53:07 +0800,
Liu Yuan wrote:
>
> > c) fix the recovery algorithm for it.
>
>
> What kind of problem to fix?
In the recovery process, sheep needs to get nr_copies of the objects
which should be stored in local. But currently there is no means to
get it without reading the vdi object (inode->nr_copies). I think
there are several approaches we could take.
1) Read all vdi objects to get the nr_copies for each object
I thought this approach was expensive if there are many vdis, but
perhaps, it might not be a problem since there should be much more
data objects.
2) Include the nr_copies in the object path
I considered this approach before. Currently, the simple store
stores objects in /store_dir/obj/[epoch]/[object id], but I
thought of changing it to
/store_dir/obj/[epoch]/[nr_copies]/[object id]. If we run the
recovery process for each [nr_copies] directory, we can know the
nr_copies without reading vdi objects.
However, this works with only the simple store driver, so it is
not a good approach for now.
3) Include the nr_copies in the object ID
We can use some bits of object ID for specifying the nr_copies.
This might be an efficient approach, but needs changes of the
object ID rules, so we need to change qemu client code too.
I thought 1) was an expensive approach before, but if we could take
it, it might be easy to support a different redundancy level in
recovery code.
Thanks,
Kazutaka
More information about the sheepdog
mailing list