In accordance with reiser4 transactional model every dirty page should be
commit3c9e01f997c081c7f78875866efc32cfad591af0
authorEdward Shishkin <edward.shishkin@gmail.com>
Fri, 25 Sep 2009 20:12:47 +0000 (25 22:12 +0200)
committerjames toy <toyj@union.edu>
Fri, 25 Sep 2009 20:12:47 +0000 (25 22:12 +0200)
tree609d935d26f2dc2e15961cc3045ab653d189ec62
parent8eec23db35ac442012e8857c9d500456779693dd
In accordance with reiser4 transactional model every dirty page should be
"captured" by some atom.  However, outside reiser4 context dirty page can
not be captured in some cases, as it is accompanied with specific work
(jnode creation, etc).  Reiser4 recognizes such "anonymous" pages (i.e.
pages that were dirtied outside of reiser4) by the tag
PAGECACHE_TAG_DIRTY.  Pages dirtied inside reiser4 context are not tagged
at all: we don't need this.  Indeed, once page is dirtied and captured, it
is attached to a jnode (a special header to keep a track of transactions).

reiser4_set_page_dirty_internal() was the internal reiser4 function that
set dirty bit without tagging the page.  Having such internal function led
to real problems (incorrect task io accounting, etc.  because of not
updating this internal "friend").

Solution:

The following patch adds a core library function that sets a dirty bit
without tagging the page.

Signed-off-by: Edward Shishkin<edward.shishkin@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/page-writeback.c