home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!dtix!mimsy!ra!tantalus!eric
- From: eric@tantalus.dell.com (Eric Youngdale)
- Newsgroups: comp.os.linux
- Subject: Re: Buffer corruption problems.
- Message-ID: <3341@ra.nrl.navy.mil>
- Date: 13 Aug 92 22:43:20 GMT
- References: <16078@ucdavis.ucdavis.edu> <1992Aug13.163854.21617@midway.uchicago.edu> <BURLEY.92Aug13153840@geech.gnu.ai.mit.edu>
- Sender: usenet@ra.nrl.navy.mil
- Organization: Naval Research Laboratory
- Lines: 46
-
- In article <BURLEY.92Aug13153840@geech.gnu.ai.mit.edu> burley@geech.gnu.ai.mit.edu (Craig Burley) writes:
- >...I believe there is a bug in Linux that has the following behavior:
- >
- >- causes Linux to "misread" one 1024KB chunk of data from a disk-based file
- > so that what your app ends up with is some _other_ 1024KB chunk
- > (apparently from the same file)
- >
- >- occurs only during very heavy disk access, such as megabytes accessed
- > continually
-
- You did not specify how many processes were doing the heavy disk
- access. If it is just one, then the problem could be localized to certain
- areas, if you need more than one, then the problem probably lies somewhere
- else.
-
- That being said, this sounds like a race to me. I started to browse
- the kernel sources, and I did spot one thing. This is a bit of a stab in the
- dark, but it would appear as if this is a bug which *might* be responsible for
- the error you are seeing. Try the following, and see what happens. I make no
- warranty, and I have not tried this. You might even want to wait for it to be
- blessed by Linus.
-
- It appears as if interrupts are re-enabled before we lock the
- request queue entry by setting the device id field. My guess is that this bug
- will only raise it's ugly head if there is more than one process trying to read
- the disk.
-
- -Eric
-
- In linux/kernel/blk_drv/ll_rw_blk.c (make_request):
- Old:
- found: sti();
- /* fill up the request-info, and add it to the queue */
- req->dev = bh->b_dev;
- req->cmd = rw;
-
- New:
-
- found:
- /* fill up the request-info, and add it to the queue */
- req->dev = bh->b_dev;
- sti();
- req->cmd = rw;
- --
- Eric Youngdale
- eric@tantalus.nrl.navy.mil
-