From: David Ashley <dash@xdr.com>
To: aebr@win.tue.nl
Cc: linux-kernel@vger.kernel.org
Subject: Re: Serious filesystem bug in linux [nevermind]
Date: Sun, 26 Jan 2003 16:42:10 -0800 [thread overview]
Message-ID: <200301270042.h0R0gAd00829@dave.home> (raw)
>On Sun, Jan 26, 2003 at 03:18:49PM -0800, David Ashley wrote:
>
>> -rw-r--r-- 1 root root 1965107636224 Jan 26 14:59 output1.iso
>
>You know about the Unix concept of files with holes?
No, but I can look into it. There is definitely some bug in my program
but I wouldn't expect this behaviour. So if I seek way the hell out
to nowhere, do a write, I'll have a file of the total amount I've skipped
over?
I just wrote a test program and it did exactly this. Thanks!
Here is the program
#define _LARGEFILE64_SOURCE
#include <fcntl.h>
#include <unistd.h>
main()
{
int fd;
char buff[32];
fd=open("/tmp/crazybigfile",O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE,0644);
lseek64(fd,1000000000000ll,SEEK_SET);
write(fd,buff,32);
close(fd);
}
Live and learn. Sorry for the alarm!
-Dave
reply other threads:[~2003-01-27 0:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301270042.h0R0gAd00829@dave.home \
--to=dash@xdr.com \
--cc=aebr@win.tue.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®