Cc: Christian Borntraeger <borntraeger@...>, Andrew Morton <akpm@...>, <linux-mm@...>, <linux-kernel@...>, Martin Schwidefsky <schwidefsky@...>, Theodore Ts'o <tytso@...>
A minor one. It still leaves us with buffer heads out of sync with
struct page.
We actually allow that currently for clean pages which is part
of what makes this tricky.
The core of my original fix was to modify init_page_buffers so that
when we added buffers to a dirty page the buffers became dirty.
Modifying the generic code is a bit spooky because it requires us
to audit the kernel to make certain nothing else depends on the
current behavior in odd ways. Although since init_page_buffers
is only called when we are adding buffer heads to an existing
page I still think that was the proper change.
The historical reason for my patches not getting merged the first
time is there was some weird issue with reiserfs ramdisks and so
Andrew disabled the code, and then dropped it when he had discovered
he had the patch disabled for several releases. I don't think
any causal relationship was ever established. But I didn't
hear enough about the reiserfs ramdisk issue, to make a guess
what was going on.
So it looks to me like the important invariant we need to maintain
is that when a ramdisk page is dirty it always has buffers and those
buffers are dirty as well. With a little care we can ensure this
happens with just modifications to rd.c
Eric
-