OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] diskquota: 32bit quota tools on 64bit architectures
Re: [PATCH] diskquota: 32bit quota tools on 64bit architectures [message #14142 is a reply to message #7646] Fri, 15 June 2007 10:03 Go to previous messageGo to previous message
Mikael Pettersson is currently offline  Mikael Pettersson
Messages: 3
Registered: June 2007
Junior Member
On Fri, 15 Jun 2007 13:01:48 +0400, Vasily Tarasov wrote:
> OpenVZ Linux kernel team has discovered the problem
> with 32bit quota tools working on 64bit architectures.
> In 2.6.10 kernel sys32_quotactl() function was replaced by sys_quotactl() with
> the comment "sys_quotactl seems to be 32/64bit clean, enable it for 32bit"
> However this isn't right. Look at if_dqblk structure:

Your patch only converts ia32 on x86-64 or ia64.
What about ppc32-on-ppc64 and sparc32-on-sparc64?
And, I guess, mips32-on-mips64?

> --- linux-2.6.22-rc4-fixed/fs/quota.c.orig 2007-06-14 15:55:26.000000000 +0400
> +++ linux-2.6.22-rc4-fixed/fs/quota.c 2007-06-14 19:50:13.000000000 +0400
...
> +#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
> +/*
> + * This code works only for 32 bit quota tools over 64 bit OS (x86_64, ia64)
> + * and is necessary due to alignment problems.
> + */

The #ifdef looks way too arch-specific. And isn't there a shared
compat.c module somewhere that this should go into?

/Mikael
 
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: Thu Aug 15 05:53:45 GMT 2024

Total time taken to generate the page: 0.02736 seconds