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

Lars Ellenberg lars.ellenberg at linbit.com
Thu Jun 11 14:08:23 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.


On Thu, Jun 11, 2009 at 11:02:41AM +0100, Nick wrote:
> 
> Please excuse my previous email with no details.... here is a patch that 
> addresses the first issue I am seeing on the ARM platform.
> 
> This addresses the issue of the 'Unknown tag' error. As you suspected 
> this is an alignment issue, if the data (in my case /dev/loop0 + NULL 
> byte) has an odd size, the previous code failed to store the tag, for 
> the subsequent parameter, due to the data pointer not falling on a word 
> boundary. This fixes it for ARM, and it continues to work on i386, 
> however I am not sure about other platforms, perhaps this would be an 
> issue on big endian platforms, since the add_tag function takes the tag 
> and size as an int, rather than a short.
> 
> Hopefully this will be the only issue I have!

Thanks.
There may be more similar places in the code.

Yes, probably the tag and size arguments should be short, not int,
or your fix would break on big endian.

please try instead of your fix to add to CFLAGS in Makefile:
-drbdsetup drbdmeta: CFLAGS += -fno-strict-aliasing
+drbdsetup drbdmeta: CFLAGS += -fno-strict-aliasing -mno-strict-align

if that works, we can just leave it to the compiler.

-- 
: Lars Ellenberg                
: LINBIT HA-Solutions GmbH
: DRBD®/HA support and consulting    http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list