lkml.org 
[lkml]   [2003]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.0test9 Reiserfs boot time "buffer layer error at fs/buffer.c:431"
Hello!

On Sat, Nov 01, 2003 at 11:33:54PM -0800, Andrew Morton wrote:
> > >> (These buffers are there because reiserfs first reads that offset (in bytes)
> > >> with whatever current blocksize is, except they should have been invalidated of
> > >> course).
> > >> Even if invalidate_bdev() -> invalidate_inode_pages() have not cleaned
> > >> everything, truncate_inode_pages() should have done this.
> > > yup.
> > The person who had the problem is actually using the Debian tree which
> > carried over a patch from 2.4 that removed the truncate_inode_pages
> > call in set_blocksize. So I appologise for the noise.

Sigh.

> truncate_inode_pages() will unconditionally remove the pages from
> pagecache: they're gone. So if some poorly behaved piece of code
> (reiserfs's read_super_block()) holds a reference against a buffer, that
> piece of code ends up owning the page - the VFS has lost interest in it.

Here's the patch against reiserfs in 2.6 (2.4 does not need it as this bit
of code is different and correct there).

===== fs/reiserfs/super.c 1.69 vs edited =====
--- 1.69/fs/reiserfs/super.c Tue Sep 23 07:16:25 2003
+++ edited/fs/reiserfs/super.c Sun Nov 2 11:11:36 2003
@@ -942,6 +942,7 @@
{
struct buffer_head * bh;
struct reiserfs_super_block * rs;
+ int fs_blocksize;


bh = sb_bread (s, offset / s->s_blocksize);
@@ -961,8 +962,9 @@
//
// ok, reiserfs signature (old or new) found in at the given offset
//
- sb_set_blocksize (s, sb_blocksize(rs));
+ fs_blocksize = sb_blocksize(rs);
brelse (bh);
+ sb_set_blocksize (s, fs_blocksize);

bh = sb_bread (s, offset / s->s_blocksize);
if (!bh) {
Bye,
Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [from the cache]
©2003-2011 Jasper Spaans