Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
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! Regards Nick -- 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); } Lars Ellenberg wrote: > On Wed, Jun 10, 2009 at 02:04:06PM +0100, Nick Liebmann wrote: > >> Thanks for the speedy response Lars, I have patched my kernel module >> (its 8.3.1, so I just changed the kmalloc to a kzalloc...I hope that is >> OK), and now no longer suffer from the kernel Oops.. great, but >> unfortunately I am still getting the REAL problem >> >> kernel: drbd0: Unknown tag: 1071 >> >> nasty:~# drbdadm attach r0 >> 0: Failure: (126) UnknownMandatoryTag >> Command 'drbdsetup 0 disk /dev/loop0 /dev/loop0 internal --set-defaults --create-device' terminated with exit code 10 >> >> >> I have found no reference to this on the mailing lists, any ideas what is going on here? >> > > nope. > maybe alignment issues. > maybe a build problem. > you need to debug that. > >