lkml.org 
[lkml]   [1999]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: files >4gig -- 2.2.9 is corrupting disk!
Hi!

> So I created a 17 gig file using Linux 2.2.9 & a file in /tmp. Interestingly
> enough at 17 gig I get an error 22 ( still have space & inodes
> available ) .

Reproduced on my 2.2.9/i386. Program does something different than it
claims to (due to limited ranges of ints etc), but causes
corruption. When I did ls -l c after run I saw rwx-----T or something
this crazy. I tried it twice, worked both times.

If you don't want to trash your harddisk, be sure to sync; killall
bdflush; sync; run test; look what it caused and then _POWER OFF
WITHOUT SYNCING_.

> #include <stdio.h>
> #include <errno.h>
> #include <fcntl.h>
> #include <unistd.h>
> /******************** BE CAREFULL ******************************/
> /* This can kill the superblock on the partition the file is written on */
> /* Which may not be recoverable gat 6/5/99 */
> /******************** BE CAREFULL *******************************/
>
> main()
> {
> long l,r;
> int e, w;
> int fd;
> fd = open("c",O_RDWR|O_CREAT|O_TRUNC);
>
> for ( l=0; l < 64000000000L; l+=1000000) {
> r = lseek(fd, l, 0);
> w = write(fd,"a",1);
> fprintf(stderr,"r=%lx, w=%d, l=%ld\n", r,w,l);
> }
> }

--
I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.049 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site