[sheepdog] [PATCH 3/5] sheep: use rbtree to manage vnodes hash ring
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Sep 9 10:29:07 CEST 2013
At Thu, 5 Sep 2013 12:38:11 +0800,
Liu Yuan wrote:
>
>
> -/* Get the n'th vnode's index which is matching the OID */
> -static inline int get_vnode_nth_idx(const struct sd_vnode *entries,
> - int nr_entries, uint64_t oid, int nth)
> +/* Replica are placed along the ring one by one with different zones */
> +static inline void oid_to_vnodes(uint64_t oid, struct rb_root *root,
> + int nr_copies,
> + struct sd_vnode **vnodes)
I think the type of vnodes should be "const struct sd_vnode **".
Thanks,
Kazutaka
More information about the sheepdog
mailing list