[DRBD-user] DRBD - on ARM (armel)

Nick nickdrbd at alfiecam.co.uk
Fri Jun 12 15:37:21 CEST 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

Thank-you very much for looking into this. I was preparing myself for a 
weekend, of delving into this stuff, which at first glance looked like 
it wasn't going to be too much fun ;-)

I see you have removed the (short*) cast.... I am not sure if it is 
necessary, but I though it might be helpful on big-endian platforms, 
where hopefully the compiler would take the pointer to the 
least-significant  word???

I will apply your fixes, and have a play over the weekend.

With my fixes, the current issue I have is:

Everything, claims to work, except data-changes are not propagated to 
the other peer....in my setup however the peer is an i386, so I was 
concerned there may be issues there. However if I 'invalidate' one end, 
all changes are propagated, so perhaps your changes will address this.. 
I do hope so.

Will let you know ASAP

Philipp Reisner wrote:
> On Thursday 11 June 2009 12:02:41 Nick wrote:
> [...]
>> -- drbdsetup.c.orig    2009-06-11 10:51:08.000000000 +0100
>> +++ drbdsetup.c    2009-06-11 10:53:43.000000000 +0100
>> @@ -549,8 +549,8 @@
>>         fprintf(stderr, "Tag list size exceeded!\n");
>>         exit(20);
>>     }
>> -    *tl->tag_list_cpos++ = tag;
>> -    *tl->tag_list_cpos++ = data_len;
>> +    memcpy(tl->tag_list_cpos++, (short*)&tag, sizeof(tl->tag_list_cpos));
>> +    memcpy(tl->tag_list_cpos++, (short*)&data_len,
>> sizeof(tl->tag_list_cpos));
>>     memcpy(tl->tag_list_cpos,data,data_len);
>>     tl->tag_list_cpos = (unsigned short*)((char*)tl->tag_list_cpos +
>> data_len);
>> }
> Hi Nick,
> I do not understand why that patch to the userland fixes the issue.
> There are similar same unaligned accesses in the kernel part.
> I have a patch attached, that should fix the complete issue, although
> I can not test it...
> When you test it, please also test the netlink packets from kernel 
> to userspace as well. I.e. drbdsetup /dev/drbd0 events, 
> drbdsetup /dev/drbd0 show, etc...
> -phil

More information about the drbd-user mailing list