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

Re: Bug in __invalidate_buffers?


On Thu, Mar 29, 2001 at 05:44:16PM -0700, Andreas Dilger wrote:
> I'm having a bit of a one-sided conversation here, but that's OK because I
> am at least able to stop the oops from happening (may not be 100% correct,
> but it works for me).  Also, Stephen mentioned he is on holidays or
> flying somewhere for a conference or something.

Just been traveling for work, and I'm currently on holiday.  Right at
this moment I'm taking a train from New Orleans to Los Angeles (nearly
48 hours on the train --- we're stopped in El Paso as I write this!).  

> Anyhow, the below patch has fixed the invalidate_buffers() causing oops
> problem for me (running LVM pvscan while writing into an ext3-0.0.6b fs).

I'd much rather fix the buffer.c code.  Having journaling try to patch
up after somebody has deleted its buffer heads is very wrong, since we
risk the buffer journal lists getting badly corrupted if we allow
those buffers to be reused.

Does the patch below (untested, uncompiled!) work?

Eventually I'll be keeping an elevated b_count on _all_ buffers with
any journal metadata at all (as a side effect of separating that
metadata out into a separate journal_head struct), so this sort of
problem will just go away.  Nobody touches buffer_heads with non-zero

--- fs/buffer.c.~1~	Wed Feb 14 15:50:08 2001
+++ fs/buffer.c	Fri Apr  6 00:43:43 2001
@@ -656,7 +656,7 @@
 				slept = 1;
-			if (!bh->b_count &&
+			if (!bh->b_count && bh->b_jlist == BJ_None &&
 			    (destroy_dirty_buffers || !buffer_dirty(bh)))
 			if (slept)

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