[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Assert in jbd-kernel.c

"Steve R. Hastings" wrote:
> Hello.  I have installed the ext3 file system on a test system, and
> sometimes I have a problem: I get an assert from within jbd-kernel.c,
> and whatever prgram was writing to the disk when this happens is unable
> to continue.

It would appear that the very new buffer invalidation code is
calling mark_buffer_clean() on an already-clean buffer.

Which is quite reasonable, actually, because mark_buffer_clean()
immediately tests that the buffer is dirty, and returns if it isn't.

But the ext3 patch does the following, in include/linux/fs.h:

static inline void mark_buffer_clean(struct buffer_head * bh)
#if defined(CONFIG_JBD_DEBUG)
       extern void jbd_preclean_buffer_check(struct buffer_head *);
       jbd_preclean_buffer_check(bh); /* @@@ Expensive debugging */
       if (atomic_set_buffer_clean(bh))

I think the jbd_preclean_buffer_check() call should only
happen *after* we've tested the buffer for dirtiness, and
of course it should no longer assert that the buffer is dirty.

Steve, I suggest that you build your kernel with `JBD Debugging Support'
disabled for the while.  That'll disable the offending code. 

I'll put a more mild check for this in the ext3 codebase so we
remember to sort this issue out when ext3 development restarts against
Linus kernels.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]