From: Philipp Reisner <philipp.reisner@linbit.com>
To: Lars Ellenberg <Lars.Ellenberg@linbit.com>
Cc: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] Re: DRBD IOCTLs nicht 64bit clean...
Date: Wed, 20 Oct 2004 12:39:55 +0200 [thread overview]
Message-ID: <200410201239.55282.philipp.reisner@linbit.com> (raw)
In-Reply-To: <NPUp4T3Ya1hNzMAxjFRXf0M=lge@web.de>
On Monday 18 October 2004 19:19, you wrote:
> / 2004-10-18 18:41:00 +0200
>
> \ Lars Ellenberg:
> > na dann, ran...
> > es ind ja nicht mehr viele.
> > gnaugenommen nur eben dieser.
> > alle anderen benutzen doch sowieso structs, und die sind doch sowieso
> > all u32/u64, oder täusch ich mich da jetzt?
>
> hm.
> eigentlich ist doch ein "int" immer 32 bit gross,
> auch auf einer 64 bit box. interessant sind also nur pointer und longs.
>
> und enums, wenn da der basistyp nicht klar ist.
[...]
You are 100% right:
phil@mescal:~/src/drbd07/testing$ file ./ioctl_structs_sizes
./ioctl_structs_sizes: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), not
stripped
phil@mescal:~/src/drbd07/testing$ ./ioctl_structs_sizes
sizeof(struct disk_config) = 24
sizeof(struct net_config) = 300
sizeof(struct syncer_config) = 20
sizeof(struct ioctl_disk_config) = 28
sizeof(struct ioctl_net_config) = 304
sizeof(struct ioctl_syncer_config) = 24
sizeof(struct ioctl_wait) = 12
sizeof(struct ioctl_get_config) = 428
sum = 1140 DRBD_07_SUM = 1140
OKAY
[root@ra2:/usr/src/drbd-0.7.5/testing]# file ./ioctl_structs_sizes
./ioctl_structs_sizes: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), dynamically linked (uses shared libs), not stripped
[root@ra2:/usr/src/drbd-0.7.5/testing]# ./ioctl_structs_sizes
sizeof(struct disk_config) = 32
sizeof(struct net_config) = 300
sizeof(struct syncer_config) = 20
sizeof(struct ioctl_disk_config) = 40
sizeof(struct ioctl_net_config) = 304
sizeof(struct ioctl_syncer_config) = 24
sizeof(struct ioctl_wait) = 12
sizeof(struct ioctl_get_config) = 432
sum = 1164 DRBD_07_SUM = 1140
FAILED
Dann alle Structs mit __attribute__((packed)) versehen:
[root@ra2:/usr/src/drbd-0.7.5/testing]# file ./ioctl_structs_sizes
./ioctl_structs_sizes: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), dynamically linked (uses shared libs), not stripped
[root@ra2:/usr/src/drbd-0.7.5/testing]# ./ioctl_structs_sizes
sizeof(struct disk_config) = 24
sizeof(struct net_config) = 300
sizeof(struct syncer_config) = 20
sizeof(struct ioctl_disk_config) = 28
sizeof(struct ioctl_net_config) = 304
sizeof(struct ioctl_syncer_config) = 24
sizeof(struct ioctl_wait) = 12
sizeof(struct ioctl_get_config) = 428
sum = 1140 DRBD_07_SUM = 1140
OKAY
I have not yet decided if I will do the reordering of the
members as well and increase the API version,
OR,
leave the members in this order and no change to the API
version number .... This would be more conventient for our
i386 users, but plain frong for the users of 64bit archs...
-Philipp
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria http://www.linbit.com :
next parent reply other threads:[~2004-10-20 10:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <gt0q2bPC2BjLTdYvoniqOkA=lge@web.de>
[not found] ` <n/0nVbG2W2wQDG4jMwN41Pc=lge@web.de>
[not found] ` <NPUp4T3Ya1hNzMAxjFRXf0M=lge@web.de>
2004-10-20 10:39 ` Philipp Reisner [this message]
2004-10-20 14:22 ` [Drbd-dev] Re: DRBD IOCTLs nicht 64bit clean Lars Ellenberg
2004-10-20 23:26 ` Lars Ellenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200410201239.55282.philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=Lars.Ellenberg@linbit.com \
--cc=drbd-dev@lists.linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.