[Sheepdog] [PATCH 1/2] add oid_to_vnodes() and obj_to_sheeps() to avoid too much vnodes traverse

Christoph Hellwig hch at infradead.org
Tue May 15 10:00:27 CEST 2012


On Tue, May 15, 2012 at 03:52:04PM +0800, levin li wrote:
> I don't think we can just call obj_to_sheeps with nr_copies=1,
> see this code:
> 
>     for (idx = 0; idx < nr_copies; idx++)
>         idxs[idx] = get_nth_node(entries, nr_entries,
>                 (pos + 1) % nr_entries, idx);
> 
> when nr_copies=1, idx is always zero, which is not what we want.

That's actually what do_recover_object expects, altough we should
remove the idx argument to not be confusing.  I guess for now it's
better to leave things as-is and apply your second version of the
patches.




More information about the sheepdog mailing list