bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 32bits compatibility not working in 64bit kernel?


From: Andrew Clausen
Subject: Re: 32bits compatibility not working in 64bit kernel?
Date: Sat, 8 Jan 2005 10:27:39 +1100
User-agent: Mutt/1.3.28i

Hi Alex,

On Thu, Jan 06, 2005 at 03:11:52PM +0100, Alex wrote:
> We need to get a 32 bits parted version working on a 64 bit 2.6.8 Linux 
> machine (Suse 9.1).

Ah, it's the good old ioctl() incompatibility bug :(

I've already had lots of fun with this one on mips64-linux (in another
project).

> For some reason the statically compiled version (newest 
> version and older versions of parted) and dynamic version fails with the 
> error "Error informing kernel about modifications to partition " etc etc. It 
> tells me to reboot the machine. With fdisk 32bits I have no problems creating 
> the partitions while with parted 64 bits it works fine as well. Don't ask me 
> why but we would like to have a 64 bit kernel working with a 32 bits parted 
> (has to do with the single installer we use for all our clusters.). 

It makes sense... 64-bit userland is usually more memory hungry, less
cache efficient, and hence slower...

Anyway, I'm betting the problem is with the BLKPG ioctl.  Fdisk doesn't
use this ioctl... it uses the BLKRRPART one.  The advantage of the BLKPG
ioctl is that it is incremental, and allows the kernel to be informed
of changes, even when some partitions on the disk are mounted.

Possible Solutions:
(1) Parted could detect if the kernel is 64-bit, and use 64-bit
structs.
(2) If BLKPG fails, try BLKRRPART.

Option (1) looks like 1-2 hours of work.  Option (2) just took me 30 seconds,
which is now in CVS.

Feel free to send me a patch that implements option (1) instead.

Cheers,
Andrew





reply via email to

[Prev in Thread] Current Thread [Next in Thread]