[sheepdog] [PATCH] sheep: no need to set SD_FLAG_CMD_WRITE for local request

levin li levin108 at gmail.com
Tue Aug 28 12:27:25 CEST 2012


On 08/28/2012 05:41 PM, MORITA Kazutaka wrote:
> At Tue, 28 Aug 2012 16:43:50 +0800,
> levin li wrote:
>>
>> On 08/28/2012 04:38 PM, Liu Yuan wrote:
>>> On 08/28/2012 04:14 PM, levin li wrote:
>>>> -	hdr.flags = SD_FLAG_CMD_WRITE;
>>>>  	hdr.data_length = sizeof(sys->this_node);
>>>
>>> Why not? We do write &sys->this_node as data to transfer.
>>>
>>> Thanks,
>>> Yuan
>>>
>>
>> For cluster requests we send data through cluster driver (corosync or zookeeper),
>> in which case SD_FLAG_CMD_WRITE is never used.
> 
> This change looks really strange to me.  If SD_FLAG_CMD_WRITE is set,
> hdr.data_length means the size of the sent data, and if not, it means
> the size of receive data buffer.
> 
> I think we shouldn't do multicast the data when SD_FLAG_CMD_WRITE is
> not set.
> 
> Thanks,
> 
> Kazutaka
> 

We use SD_FLAG_CMD_WRITE to tell sheep receiver that there's body data in the request,
but when we multicast data, we use cluster driver to transfer these data, and SD_FLAG_CMD_WRITE
is not used, moreover for multicast it always means that we send data to other nodes,
not receive.

thanks

levin





More information about the sheepdog mailing list