lkml.org 
[lkml]   [2001]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Patch (repost): cramfs memory corruption fix


On Sat, 6 Jan 2001, Adam J. Richter wrote:
>
> This sounds like a bug that I posted a fix for a long time ago.
> cramfs calls bforget on the superblock area, destroying that block of
> the ramdisk, even when the ramdisk does not contain a cramfs file system.
> Normally, bforget is called on block that really can be trashed,
> such as blocks release by truncate or unlink.

I'd really prefer just not letting bforget() touch BH_Protected buffers.
bforget() is also used by other things than unlink/truncate: it's used by
various partition codes etc, and it's used by the raid logic.

Now, nobody wants to use RAID on a ramdisk, but the fact is that
"bforget()" does not mean "forget the contents of this buffer", but it
really means "you can forget this cached copy even if it is dirty, we're
not likely to need it in the near future and can read it back in".

Also, if you care about memory usage, you're likely to be much better off
using ramfs rather than something like "ext2 on ramdisk". You won't get
the double buffering.

Linus

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

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