diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-12-14 03:18:17 -0800 |
|---|---|---|
| committer | Jaroslav Kysela <perex@suse.cz> | 2002-12-14 03:18:17 -0800 |
| commit | 577c516f30df0f8a3d91e3beb68be3374ad25a8c (patch) | |
| tree | 15589afab70e86c73244f0beba07ab5200bdedff /include/linux/fs.h | |
| parent | 8725c3fccdf07ee30d1e5bac5b065c16e4632982 (diff) | |
[PATCH] remove PF_SYNC
current->flags:PF_SYNC was a hack I added because I didn't want to
change all ->writepage implementations.
It's foul. And it means that if someone happens to run direct page
reclaim within the context of (say) sys_sync, the writepage invokations
from the VM will be treated as "data integrity" operations, not "memory
cleansing" operations, which would cause latency.
So the patch removes PF_SYNC and adds an extra arg to a_ops->writepage.
It is the `writeback_control' structure which contains the full context
information about why writepage was called.
The initial version of this patch just passed in a bare `int sync', but
the XFS team need more info so they can perform writearound from within
page reclaim.
The patch also adds writeback_control.for_reclaim, so writepage
implementations can inspect that to work out the call context rather
than peeking at current->flags:PF_MEMALLOC.
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index afbb9474f25b..bd133801c3e0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -278,7 +278,7 @@ struct address_space; struct writeback_control; struct address_space_operations { - int (*writepage)(struct page *); + int (*writepage)(struct page *page, struct writeback_control *wbc); int (*readpage)(struct file *, struct page *); int (*sync_page)(struct page *); |
