Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-21 Thread Blaisorblade
On Tuesday 20 December 2005 22:13, Joel Palmius wrote: > On Tue, 20 Dec 2005, Blaisorblade wrote: > > So we need an utility doing just the setup and the writeout. Should be > > easy to do, but I must learn the complete COW API. I will dismiss this > > task if I see (as it seems) that there are no e

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-21 Thread Blaisorblade
On Wednesday 21 December 2005 08:16, Jim Carter wrote: > On Mon, 19 Dec 2005, Blaisorblade wrote: > > On Monday 19 December 2005 21:19, Jim Carter wrote: > > The problem lies in the #ifdef mapping ntohll to _bswap64 - in 2.6.13 it > > was changed in a wrong way (and not by anybody present here - so

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-20 Thread Jim Carter
On Mon, 19 Dec 2005, Blaisorblade wrote: > On Monday 19 December 2005 21:19, Jim Carter wrote: > The problem lies in the #ifdef mapping ntohll to _bswap64 - in 2.6.13 it was > changed in a wrong way (and not by anybody present here - somebody went with > a "nice cleanup" without understanding wh

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-20 Thread Joel Palmius
On Tue, 20 Dec 2005, Blaisorblade wrote: So we need an utility doing just the setup and the writeout. Should be easy to do, but I must learn the complete COW API. I will dismiss this task if I see (as it seems) that there are no existing COW files. Personally I stopped trusting COW files once

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-20 Thread Blaisorblade
On Friday 16 December 2005 17:03, Blaisorblade wrote: > On Thursday 15 December 2005 21:15, Jeff Dike wrote: > > On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > We want a utility read-wrong-V3-header / write right one. I have this support - indeed I've integrated the code to recog

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-20 Thread Jeff Dike
On Tue, Dec 20, 2005 at 06:25:20PM +0100, Blaisorblade wrote: > > Why (in format v3) is everything in network byte order? > > I'm not entitled to answer - I wasn't here when it was born, and the decision > traces to V2. It's the reason that was speculated - it makes COW files more transportable.

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-20 Thread Blaisorblade
On Monday 19 December 2005 21:19, Jim Carter wrote: > On Fri, 16 Dec 2005, Blaisorblade wrote: > > On Thursday 15 December 2005 21:15, Jeff Dike wrote: > > > On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > > > > The problem is that the same declaration is used in kernel sources. > >

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-20 Thread Bastian Blank
On Mon, Dec 19, 2005 at 04:54:40PM +0100, Blaisorblade wrote: > IIRC, I saw with gdb that int are 4-byte aligned even on x86_64 - how does it > go for 2-byte and 1-byte wide fields? On Linux/x86_64, all integer types are alligned according to there size. Bastian -- Every living thing wants to

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-19 Thread Blaisorblade
On Monday 19 December 2005 21:19, Jim Carter wrote: > On Fri, 16 Dec 2005, Blaisorblade wrote: > > On Thursday 15 December 2005 21:15, Jeff Dike wrote: > > > On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > > > > The problem is that the same declaration is used in kernel sources. > >

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-19 Thread Jim Carter
On Fri, 16 Dec 2005, Blaisorblade wrote: > On Thursday 15 December 2005 21:15, Jeff Dike wrote: > > On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > > > The problem is that the same declaration is used in kernel sources. I.e., > > > we have (likely) COW files generated from 64-bit m

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-19 Thread Blaisorblade
On Monday 19 December 2005 14:42, Bastian Blank wrote: > On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > > there is a different amount of padding between fields - on 64-bit > > machines the natural alignment of __u64 is 8 bytes rather than 4, so 4 > > padding bytes get added between

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-19 Thread Bastian Blank
On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > there is a different amount of padding between fields - on 64-bit machines > the > natural alignment of __u64 is 8 bytes rather than 4, so 4 padding bytes get > added between mtime and size on 64-bit binaries. Just for the record,

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-16 Thread Blaisorblade
On Thursday 15 December 2005 21:15, Jeff Dike wrote: > On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > > The problem is that the same declaration is used in kernel sources. I.e., > > we have (likely) COW files generated from 64-bit machines using a > > different format from 32-bit o

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-15 Thread Jeff Dike
On Thu, Dec 15, 2005 at 05:26:44PM +0100, Blaisorblade wrote: > The problem is that the same declaration is used in kernel sources. I.e., we > have (likely) COW files generated from 64-bit machines using a different > format from 32-bit ones. So we have two incompatible formats out there in the

Re: Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-15 Thread Joel Palmius
On Thu, 15 Dec 2005, Blaisorblade wrote: uml_moo says "arithmetical error". I'm only guessing this is because the root/cow files are too large..? Or is it a 64-bit host error? ... Just for confirmation - I looked in your mails but I found a missing detail: I expect you used a 32-bit kernel to

Bug in COW format - 64-bit incompatible with 32-bit due to struct padding (was: Re: [uml-user] uml_moo and large files)

2005-12-15 Thread Blaisorblade
On Sunday 16 October 2005 18:26, Joel Palmius wrote: > [EMAIL PROTECTED] /export/virtual/usermode/machine.master $ ls -lh > totalt 4,3G > -rwxr-xr-x 1 joepal users 671 16 okt 16.09 config.pl* > lrwxrwxrwx 1 joepal users 12 16 okt 16.09 master.uml -> ../lib/linux* > -rw-r--r-- 1 joepal users 4

Re: [uml-user] uml_moo and large files

2005-10-21 Thread Joel Palmius
I've put up a (newly-created) cow file on: http://gathering.itm.mh.se/~joepal/uml/root_fs.cow.bz2(75k) This is created on an amd64 host running 2.6.13.3 unpatched host, 2.6.13.4-bs4 guest with ext2 file system (if that has anything to do with it). uml_moo has not been run on the file (I te

Re: [uml-user] uml_moo and large files

2005-10-19 Thread Blaisorblade
On Wednesday 19 October 2005 11:32, Joel Palmius wrote: > > No, V3 is in use since long time - a lot before 2.4.24 surely. > > Then there's another (minor) bug in uml_moo :-) > > [EMAIL PROTECTED] /export/virtual/usermode/machine.test $ ./uml_moo > ... > ./uml_moo supports version 1 and 2 COW files

Re: [uml-user] uml_moo and large files

2005-10-19 Thread Joel Palmius
No, V3 is in use since long time - a lot before 2.4.24 surely. Then there's another (minor) bug in uml_moo :-) [EMAIL PROTECTED] /export/virtual/usermode/machine.test $ ./uml_moo ... ./uml_moo supports version 1 and 2 COW files. [EMAIL PROTECTED] /export/virtual/usermode/machine.test $ Is thi

Re: [uml-user] uml_moo and large files

2005-10-18 Thread Blaisorblade
On Tuesday 18 October 2005 10:34, Joel Palmius wrote: > (gdb) run > Starting program: /export/virtual/usermode/machine.test/uml_moo root_fs.cow > newroot > > Program received signal SIGFPE, Arithmetic exception. > 0x00402021 in read_cow_header (reader=0x401d51 , > arg=0x7fffe1b4, versio

Re: [uml-user] uml_moo and large files

2005-10-18 Thread Joel Palmius
(gdb) run Starting program: /export/virtual/usermode/machine.test/uml_moo root_fs.cow newroot Program received signal SIGFPE, Arithmetic exception. 0x00402021 in read_cow_header (reader=0x401d51 , arg=0x7fffe1b4, version_out=0x7fffe0cc, backing_file_out=0x7fffe0b8, mtime

Re: [uml-user] uml_moo and large files

2005-10-17 Thread Blaisorblade
On Tuesday 18 October 2005 00:29, Joel Palmius wrote: > It was altogether too long since I did any lowlevel programming. I must > admit I don't get a whole lot out of gdb. > > [EMAIL PROTECTED] /export/virtual/usermode/machine.test $ gdb --args > /usr/bin/uml_moo root_fs.cow newroot > > GNU gdb 6.3

Re: [uml-user] uml_moo and large files

2005-10-17 Thread Joel Palmius
It was altogether too long since I did any lowlevel programming. I must admit I don't get a whole lot out of gdb. [EMAIL PROTECTED] /export/virtual/usermode/machine.test $ gdb --args /usr/bin/uml_moo root_fs.cow newroot GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free sof

Re: [uml-user] uml_moo and large files

2005-10-17 Thread Blaisorblade
On Sunday 16 October 2005 18:26, Joel Palmius wrote: > [EMAIL PROTECTED] /export/virtual/usermode/machine.master $ ls -lh > totalt 4,3G > -rwxr-xr-x 1 joepal users 671 16 okt 16.09 config.pl* > lrwxrwxrwx 1 joepal users 12 16 okt 16.09 master.uml -> ../lib/linux* > -rw-r--r-- 1 joepal users 4