diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-05-19 02:21:48 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2002-05-19 02:21:48 -0700 |
| commit | 610c5ab86ed7e1647ba3cedd20ab0f946b264c9d (patch) | |
| tree | 7ae0f4b4a775ddd66a78f98be042b3667a035d54 /include/linux | |
| parent | 2d8f24d09522389b8c382f46cd0a69d32ac959fb (diff) | |
[PATCH] dirty inode management
Fix the "race with umount" in __sync_list(). __sync_list() no longer
puts inodes onto a local list while writing them out.
The super_block.sb_dirty list is kept time-ordered. Mappings which
have the "oldest" ->dirtied_when are kept at sb->s_dirty.prev.
So the time-based writeback (kupdate) can just bale out when it
encounters a not-old-enough mapping, rather than walking the entire
list.
dirtied_when is set on the *first* dirtying of a mapping. So once the
mapping is marked dirty it strictly retains its place on s_dirty until
it reaches the oldest end and is written out. So frequently-dirtied
mappings don't stay dirty at the head of the list for all time.
That local inode list was there for livelock avoidance. Livelock is
instead avoided by looking at each mapping's ->dirtied_when. If we
encounter one which was dirtied after this invokation of __sync_list(),
then just bale out - the sync functions are only required to write out
data which was dirty at the time when they were called.
Keeping the s_dirty list in time-order is the right thing to do anyway
- so all the various writeback callers always work against the oldest
data.
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
