]> git.neil.brown.name Git - history.git/commit
[PATCH] ext3: fix data=journal mode
authorAndrew Morton <akpm@digeo.com>
Wed, 18 Jun 2003 01:31:29 +0000 (18:31 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 18 Jun 2003 01:31:29 +0000 (18:31 -0700)
commitde285c52487c286ebf7a777a5fd25c96f58eb3c0
tree92af6a176939d3036de5c83597d5428d8958ea23
parent8b7eec3b3b37aa667c42d430d821b0746e303e18
[PATCH] ext3: fix data=journal mode

ext3's fully data-journalled mode has been broken for a year.  This patch
fixes it up.

The prepare_write/commit_write/writepage implementations have been split up.
Instead of having each function handle all three journalling mode we now have
three separate sets of address_space_operations.

The problematic part of data=journal is MAP_SHARED writepage traffic: pages
which don't have buffers.  In 2.4 these were cheatingly treated as
data-ordered buffers and that caused several nasty problems.

Here we do it properly: writepage traffic is fully journalled.  This means
that the various workarounds for the 2.4 scheme can be removed, when I
remember where they all are.

The PG_checked flag has been borrowed: it it set in the atomic set_page_dirty
a_op to tell the subsequent writepage() that this page needs to have buffers
attached, dirtied and journalled.

This rather defines PG_checked as "fs-private info in page->flags" and it
should be renamed sometime.
fs/ext3/inode.c
fs/ext3/namei.c
fs/jbd/transaction.c
include/linux/ext3_fs.h
include/linux/page-flags.h