From: Chris Mason <chris.mason@oracle.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Theodore Ts'o <tytso@mit.edu>,
stable@kernel.org
Subject: Re: [PATCH] rd: Mark ramdisk buffers heads dirty
Date: Wed, 17 Oct 2007 15:14:16 -0400 [thread overview]
Message-ID: <1192648456.15717.7.camel@think.oraclecorp.com> (raw)
In-Reply-To: <m1sl49ei8x.fsf@ebiederm.dsl.xmission.com>
On Wed, 2007-10-17 at 11:57 -0600, Eric W. Biederman wrote:
> Christian Borntraeger <borntraeger@de.ibm.com> writes:
>
> > Eric,
> >
> > Am Dienstag, 16. Oktober 2007 schrieb Christian Borntraeger:
> >> Am Dienstag, 16. Oktober 2007 schrieb Eric W. Biederman:
> >>
> >> > fs/buffer.c | 3 +++
> >> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >> > drivers/block/rd.c | 13 +------------
> >> > 1 files changed, 1 insertions(+), 12 deletions(-)
> >>
> >> Your patches look sane so far. I have applied both patches, and the problem
> >> seems gone. I will try to get these patches to our testers.
> >>
> >> As long as they dont find new problems:
> >
> > Our testers did only a short test, and then they were stopped by problems with
> > reiserfs. At the moment I cannot say for sure if your patch caused this, but
> > we got the following BUG
>
> Thanks.
>
> > ReiserFS: ram0: warning: Created .reiserfs_priv on ram0 - reserved for xattr
> > storage.
> > ------------[ cut here ]------------
> > kernel BUG at
> > /home/autobuild/BUILD/linux-2.6.23-20071017/fs/reiserfs/journal.c:1117!
> > illegal operation: 0001 [#1]
> > Modules linked in: reiserfs dm_multipath sunrpc dm_mod qeth ccwgroup vmur
> > CPU: 3 Not tainted
> > Process reiserfs/3 (pid: 2592, task: 77dac418, ksp: 7513ee88)
> > Krnl PSW : 070c3000 fb344380 (flush_commit_list+0x808/0x95c [reiserfs])
> > R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:3 PM:0
> > Krnl GPRS: 00000002 7411b5c8 0000002b 00000000
> > 7b04d000 00000001 00000000 76d1de00
> > 7513eec0 00000003 00000012 77f77680
> > 7411b608 fb343b7e fb34404a 7513ee50
> > Krnl Code: fb344374: a7210002 tmll %r2,2
> > fb344378: a7840004 brc 8,fb344380
> > fb34437c: a7f40001 brc 15,fb34437e
> > >fb344380: 5810d8c2 l %r1,2242(%r13)
> > fb344384: 5820b03c l %r2,60(%r11)
> > fb344388: 0de1 basr %r14,%r1
> > fb34438a: 5810d90e l %r1,2318(%r13)
> > fb34438e: 5820b03c l %r2,60(%r11)
> >
> >
> > Looking at the code, this really seems related to dirty buffers, so your patch
> > is the main suspect at the moment.
>
> Sounds reasonable.
>
> > if (!barrier) {
> > /* If there was a write error in the journal - we can't commit
> > * this transaction - it will be invalid and, if successful,
> > * will just end up propagating the write error out to
> > * the file system. */
> > if (likely(!retval && !reiserfs_is_journal_aborted (journal))) {
> > if (buffer_dirty(jl->j_commit_bh))
> > 1117----> BUG();
> > mark_buffer_dirty(jl->j_commit_bh) ;
> > sync_dirty_buffer(jl->j_commit_bh) ;
> > }
> > }
>
> Grr. I'm not certain how to call that.
>
> Given that I should also be able to trigger this case by writing to
> the block device through the buffer cache (to the write spot at the
> write moment) this feels like a reiserfs bug.
> Although I feel
> screaming about filesystems that go BUG instead of remount read-only....
>
In this case, the commit block isn't allowed to be dirty before reiserfs
decides it is safe to write it. The journal code expects it is the only
spot in the kernel setting buffer heads dirty, and it only does so after
the rest of the log blocks are safely on disk.
Given this is a ramdisk, the check can be ignored, but I'd rather not
sprinkle if (ram_disk) into the FS code....
> At the same time I increasingly don't think we should allow user space
> to dirty or update our filesystem metadata buffer heads. That seems
> like asking for trouble.
>
Demanding trouble ;)
-chris
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-10-17 19:14 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 8:28 [PATCH resend] ramdisk: fix zeroed ramdisk pages on memory pressure Christian Borntraeger
2007-10-15 14:06 ` Nick Piggin
2007-10-15 9:05 ` Christian Borntraeger
2007-10-15 14:38 ` Nick Piggin
2007-10-15 18:38 ` Eric W. Biederman
2007-10-15 22:37 ` Eric W. Biederman
2007-10-15 22:40 ` [PATCH] rd: Preserve the dirty bit in init_page_buffers() Eric W. Biederman
2007-10-15 22:42 ` [PATCH] rd: Mark ramdisk buffers heads dirty Eric W. Biederman
2007-10-16 7:56 ` Christian Borntraeger
2007-10-16 9:22 ` Eric W. Biederman
2007-10-17 16:14 ` Christian Borntraeger
2007-10-17 17:57 ` Eric W. Biederman
2007-10-17 19:14 ` Chris Mason [this message]
2007-10-17 20:29 ` Eric W. Biederman
2007-10-17 20:54 ` Chris Mason
2007-10-17 21:30 ` Eric W. Biederman
2007-10-17 22:58 ` Chris Mason
2007-10-17 23:28 ` Eric W. Biederman
2007-10-18 0:03 ` Chris Mason
2007-10-18 3:27 ` Eric W. Biederman
2007-10-18 3:59 ` [RFC][PATCH] block: Isolate the buffer cache in it's own mappings Eric W. Biederman
2007-10-18 4:32 ` Andrew Morton
2007-10-19 21:27 ` Eric W. Biederman
2007-10-21 4:24 ` Nick Piggin
2007-10-21 4:53 ` Eric W. Biederman
2007-10-21 5:36 ` Nick Piggin
2007-10-21 7:09 ` Eric W. Biederman
2007-10-22 0:15 ` David Chinner
2007-10-18 5:10 ` Nick Piggin
2007-10-19 21:35 ` Eric W. Biederman
2007-10-17 21:48 ` [PATCH] rd: Mark ramdisk buffers heads dirty Christian Borntraeger
2007-10-17 22:22 ` Eric W. Biederman
2007-10-18 9:26 ` Christian Borntraeger
2007-10-19 22:46 ` Eric W. Biederman
2007-10-19 22:51 ` [PATCH] rd: Use a private inode for backing storage Eric W. Biederman
2007-10-21 4:28 ` Nick Piggin
2007-10-21 5:10 ` Eric W. Biederman
2007-10-21 5:24 ` Nick Piggin
2007-10-21 6:48 ` Eric W. Biederman
2007-10-21 7:28 ` Christian Borntraeger
2007-10-21 8:23 ` Eric W. Biederman
2007-10-21 9:56 ` Nick Piggin
2007-10-21 18:39 ` Eric W. Biederman
2007-10-22 1:56 ` Nick Piggin
2007-10-22 13:11 ` Chris Mason
2007-10-21 9:39 ` Nick Piggin
2007-10-21 17:56 ` Eric W. Biederman
2007-10-22 0:29 ` Nick Piggin
2007-10-16 8:19 ` [PATCH] rd: Mark ramdisk buffers heads dirty Nick Piggin
2007-10-16 8:48 ` Christian Borntraeger
2007-10-16 19:06 ` Eric W. Biederman
2007-10-16 22:06 ` Nick Piggin
2007-10-16 8:12 ` [PATCH] rd: Preserve the dirty bit in init_page_buffers() Nick Piggin
2007-10-16 9:35 ` Eric W. Biederman
2007-10-15 9:16 ` [PATCH resend] ramdisk: fix zeroed ramdisk pages on memory pressure Andrew Morton
2007-10-15 15:23 ` Nick Piggin
2007-10-16 3:14 ` Eric W. Biederman
2007-10-16 6:45 ` Nick Piggin
2007-10-16 4:57 ` Eric W. Biederman
2007-10-16 8:08 ` Nick Piggin
2007-10-16 7:47 ` [patch][rfc] rewrite ramdisk Nick Piggin
2007-10-16 7:52 ` Jan Engelhardt
2007-10-16 8:07 ` Nick Piggin
2007-10-16 8:17 ` Jan Engelhardt
2007-10-16 8:26 ` Nick Piggin
2007-10-16 8:53 ` Jan Engelhardt
2007-10-16 9:08 ` Eric W. Biederman
2007-10-16 21:28 ` Theodore Tso
2007-10-16 22:08 ` Nick Piggin
2007-10-16 23:48 ` Eric W. Biederman
2007-10-17 0:28 ` Nick Piggin
2007-10-17 1:13 ` Eric W. Biederman
2007-10-17 1:47 ` Nick Piggin
2007-10-17 10:30 ` Eric W. Biederman
2007-10-17 12:49 ` Nick Piggin
2007-10-17 18:45 ` Eric W. Biederman
2007-10-18 1:06 ` Nick Piggin
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=1192648456.15717.7.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@de.ibm.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
--cc=schwidefsky@de.ibm.com \
--cc=stable@kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).