Skip to contentSkip to conversation

Bug?

Drbd-dev Milind Dumbare 2 participants 4 messages Jul 24, 2006 – Jul 25, 2006 DRBD driver

lore
Share & tools
lore
#0 lore raw

Hi,
First of all to tell I am working on x86_64 machine.

The structure ioctl_get_config has size 576(bytes) and its padded with int (4byte) so it makes 580 (bytes). And compiler will align it to 584 (bytes), as 580 is not completely divisible by 8 while 584 is.

So don't you think drbd_sizeof_sanity_check.c:21 should be

SZO(struct ioctl_get_config, 576)
rather than
SZO(struct ioctl_get_config, 580)

after removing padding. It will also be alligned on 32 bit compilers.

-Thanks
-Milind

maintainer
#1 lore raw

/ 2006-07-24 20:38:33 +0530
\ Milind Dumbare:

Quoted 7 lines

Hi,
First of all to tell I am working on x86_64 machine.

The structure ioctl_get_config has size 576(bytes) and its padded with int (4byte) so it makes 580 (bytes). And compiler will align it to 584 (bytes), as 580 is not completely divisible by 8 while 584 is.

Quoted 5 lines

So don't you think drbd_sizeof_sanity_check.c:21 should be

SZO(struct ioctl_get_config, 576)
rather than
SZO(struct ioctl_get_config, 580)

when filing bugs, please state against which version you complain. (in this case, I guess 8-pre something tarball).
when it is not the latest version, check whether it has already been fixed, as I think for this issue recent versions (svn) are fixed, and we now have compile time asserts instead of runtime asserts in place.

yes, we probably should upload some new 8pre-something tarballs.

thanks,

Signature · 3 lines
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
#2 lore raw
Quoted 25 lines · Lars Ellenberg

/ 2006-07-24 20:38:33 +0530
\ Milind Dumbare:

Quoted 7 lines

Hi,
First of all to tell I am working on x86_64 machine.

The structure ioctl_get_config has size 576(bytes) and its padded with int (4byte) so it makes 580 (bytes). And compiler will align it to 584 (bytes), as 580 is not completely divisible by 8 while 584 is.

Quoted 7 lines

So don't you think drbd_sizeof_sanity_check.c:21 should be

SZO(struct ioctl_get_config, 576)
rather than
SZO(struct ioctl_get_config, 580)

when filing bugs, please state against which version you complain. (in this case, I guess 8-pre something tarball).
when it is not the latest version, check whether it has already been fixed, as I think for this issue recent versions (svn) are fixed, and we now have compile time asserts instead of runtime asserts in place.

Quoted 6 lines

yes, we probably should upload some new 8pre-something tarballs.

thanks,

Where can we access SVN from? Do everybody has access to it? What do I have to do if I want to have access if its resticted? -Milind

maintainer
#3 lore raw

/ 2006-07-25 14:41:37 +0530
\ Milind Dumbare:

Quoted 2 lines

Where can we access SVN from? Do everybody has access to it? What do I have to do if I want to have access if its resticted?

the first hit in google "drbd svn access" is
http://www.drbd.org/latest.html and explains it.

svn co http://svn.drbd.org/drbd/trunk/ drbd-latest (which may well be in a state that does not even work at all.
though we try to avoid non-working commits)

thanks,

Signature · 3 lines
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :