aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-11-16 18:07:01 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-01-06 14:58:38 -0500
commit22905f775dd6a8b73be99826dcad07ceec00244b (patch)
tree960c0ad3d10fa208a31b78256788f332e5ebdd48 /mm/page-writeback.c
parentd99cf9d679a520d67f81d805b7cb91c68e1847f0 (diff)
identify multipage ->writepages() calls
NFS needs to be able to distinguish between single-page ->writepage() calls and multipage ->writepages() calls. For the single-page writepage calls NFS can kick off the I/O within the context of ->writepage(). For multipage ->writepages calls, nfs_writepage() will leave the I/O pending and nfs_writepages() will kick off the I/O when it all has been queued up within NFS. Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 0166ea15c9ee..5240e426c1f7 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -550,11 +550,17 @@ void __init page_writeback_init(void)
550 550
551int do_writepages(struct address_space *mapping, struct writeback_control *wbc) 551int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
552{ 552{
553 int ret;
554
553 if (wbc->nr_to_write <= 0) 555 if (wbc->nr_to_write <= 0)
554 return 0; 556 return 0;
557 wbc->for_writepages = 1;
555 if (mapping->a_ops->writepages) 558 if (mapping->a_ops->writepages)
556 return mapping->a_ops->writepages(mapping, wbc); 559 ret = mapping->a_ops->writepages(mapping, wbc);
557 return generic_writepages(mapping, wbc); 560 else
561 ret = generic_writepages(mapping, wbc);
562 wbc->for_writepages = 0;
563 return ret;
558} 564}
559 565
560/** 566/**