[sheepdog] [PATCH] collie: clean up and fix 'vdi track'

Liu Yuan namei.unix at gmail.com
Mon Nov 26 11:38:07 CET 2012


On 11/26/2012 06:02 PM, MORITA Kazutaka wrote:
>         for (i = nr_logs - 1; i >= 0; i--) {
                  effective_cp = min((uint32_t)nr_copies, logs[i].nr_nodes);
>                 printf("\nobj %"PRIx64" locations at epoch %d, copies = %d\n",
>                        oid, logs[i].epoch, nr_copies);
>                 printf("---------------------------------------------------\n");
> 
>                 vnodes_nr = nodes_to_vnodes(logs[i].nodes,
>                                             logs[i].nr_nodes, vnodes);
>                 oid_to_vnodes(vnodes, vnodes_nr, oid, effective_cp, vnode_buf);

maybe pass effective copies number is better?

Thanks,
Yuan
>                 for (j = 0; j < effective_cp; j++) {
>                         addr_to_str(host, sizeof(host), vnode_buf[j]->nid.addr,
>                                     vnode_buf[j]->nid.port);
>                         printf("%s\n", host);
>                 }
>         }




More information about the sheepdog mailing list