Cc: Christian Borntraeger <borntraeger@...>, Andrew Morton <akpm@...>, Nick Piggin <nickpiggin@...>, <linux-mm@...>, <linux-kernel@...>, Martin Schwidefsky <schwidefsky@...>, Theodore Ts'o <tytso@...>, <stable@...>
On Wed, 2007-10-17 at 15:30 -0600, Eric W. Biederman wrote:
So, the problem is using the Dirty bit to indicate pinned. You're
completely right that our current setup of buffer heads and pages and
filesystem metadata is complex and difficult.
But, moving the buffer heads off of the page cache pages isn't going to
make it any easier to use dirty as pinned, especially in the face of
buffer_head users for file data pages.
You've already seen Nick fsblock code, but you can see my general
approach to replacing buffer heads here:
http://oss.oracle.com/mercurial/mason/btrfs-unstable/file/f89e7971692f/extent_map.h
(alpha quality implementation in extent_map.c and users in inode.c) The
basic idea is to do extent based record keeping for mapping and state of
things in the filesystem, and to avoid attaching these things to the
page.
Don't get me wrong, I'd love to see a simple and coherent fix for what
reiserfs and ext3 do with buffer head state, but I think for the short
term you're best off pinning the ramdisk pages via some other means.
-chris
-