OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] diskquota: 32bit quota tools on 64bit architectures
Re: [PATCH] diskquota: 32bit quota tools on 64bit architectures [message #14153 is a reply to message #14152] Fri, 15 June 2007 15:24 Go to previous messageGo to previous message
Arnd Bergmann is currently offline  Arnd Bergmann
Messages: 10
Registered: February 2006
Junior Member
On Friday 15 June 2007, Vasily Tarasov wrote:
> I just noticed that we can not avoid the addition of packed attribute.
> Look, for example:
>
> struct if_dqblk {
>         __u64 dqb_bhardlimit;
>         __u64 dqb_bsoftlimit;
>         __u64 dqb_curspace;
>         __u64 dqb_ihardlimit;
>         __u64 dqb_isoftlimit;
>         __u64 dqb_curinodes;
>         __u64 dqb_btime;
>         __u64 dqb_itime;
>         __u32 dqb_valid;
> };
>
> sizeof(if_dqblk) = 0x48
> On 32 bit: 0x44
>
> If I replace __u64/__u32 with compat equivalents - it will not help!
> alligned attribute can _only_ _increase_ the size of structure, but not
> decrease it.

No, the gcc documentation isn't quite clear there, see the discussion about
compat_u64 and compat_s64 types. It actually does the right thing when
you use 'typedef __u64 __attribute__((aligned(64))) compat_64', as my
patch does.

Arnd <><
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 16/17] Pid-NS(V3) Remove proc_mnts use for killing inodes
Next Topic: [PATCH 12/17] Pid-NS(V3) Terminate processes in a ns when reaper is exiting.
Goto Forum:
  


Current Time: Tue Jul 16 16:02:46 GMT 2024

Total time taken to generate the page: 0.02967 seconds