An open with O_CREAT should have a mode (for example 0666) as the 3rd
argument. If it's omitted, the call with usually pick up some garbage
from the stack and use it as file's permissions.
So, unlike the printk, this is program's rather than system bug.
> The first thing to notice is that I have divided GB by 2. If I don't do
> this the program fails after making a 1G file, and I get a nice printk()
> from the ext2fs. So I divided by two and reran. Now I can make a very
> large file, but something is still wrong:
>
> total 76
> -rwxrwxrwx 1 jlnance users 14378 Nov 4 07:39 a.out*
> -rw-rw-rw- 1 jlnance users 544 Nov 4 07:38 big.c
> -r-xrwS--T 1 jlnance users 10200547329 Nov 4 07:43 bigfile*
>
-- _. _ . (_ ,_ _ , . / ` _ _L | Email: Oleg Kibirev <snowcat@netgate.net> ._)| U(_)\/\/ \_,(_L/L | Visit http://math.math.CSUFresno.EDU/~oleg/math.html ------------------------' to get my programs + PGP public key