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

Philipp Reisner philipp.reisner at linbit.com
Fri Jun 12 14:32:31 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 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
-- 
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_for_unaligned_access.diff
Type: text/x-patch
Size: 11172 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20090612/52a23aaf/attachment.bin>


More information about the drbd-user mailing list