[sheepdog] [PATCH v2 8/8] sheep: use node_id_cmp to compare node

Liu Yuan namei.unix at gmail.com
Wed Jun 27 09:31:46 CEST 2012


On 06/27/2012 04:50 AM, Christoph Hellwig wrote:
> On Tue, Jun 26, 2012 at 05:53:24PM +0800, Liu Yuan wrote:
>>> 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).
> 
> They'll just get called with void arguments, but they make sure to
> exract the node_id at exact the field they are emeeded into the bigger
> structures by using container_of.
> 

I am still puzzled for this. If you still insist on it, I am not against
of you to submit a patch for it to make it type safe as you advertised
after this series get it.

Thanks,
Yuan



More information about the sheepdog mailing list