On 06/26/2012 05:03 PM, Christoph Hellwig wrote:
> On Tue, Jun 26, 2012 at 10:32:15AM +0800, Liu Yuan wrote:
>> I don't think so. Both for vnode_node_cmp and node_cmp, the only caller
>> are bsearch and lfind, which need a prototype of int (*compar)(const
>> void *, const void *). It is meaningless to add a wrapper at least for
>> now. I also think folding doesn't make sense, this patch need a separate
>> one for better review.
> 
> Now if you change or move the node_id structure these variant will silently
> break.  If you use the proper type safe container_of variant you do get
> the proper warnings in that case.  Moreover the compile will produce
> tail calls and thus produce the same executable code if you put the
> wrappers into the same file.
> 

Well, I am not get what you meant for wrappers. Looks to me that there
isn't places to call those wrappers like node_cmp(sd_node1, sd_node2).

Thanks,
Yuan

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to