aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-04-02 19:29:52 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-01 01:17:06 -0400
commitc63c7b051395368573779c8309aa5c990dcf2f96 (patch)
treedb54090eef99349d15b95fcd8c2620a2403d8db8 /include/linux/writeback.h
parent8b09bee3083897e375bd0bf9d60f48daedfab3e0 (diff)
NFS: Fix a race when doing NFS write coalescing
Currently we do write coalescing in a very inefficient manner: one pass in generic_writepages() in order to lock the pages for writing, then one pass in nfs_flush_mapping() and/or nfs_sync_mapping_wait() in order to gather the locked pages for coalescing into RPC requests of size "wsize". In fact, it turns out there is actually a deadlock possible here since we only start I/O on the second pass. If the user signals the process while we're in nfs_sync_mapping_wait(), for instance, then we may exit before starting I/O on all the requests that have been queued up. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 0c78f7f4a976..daa6c125f66e 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -59,6 +59,8 @@ struct writeback_control {
59 unsigned for_reclaim:1; /* Invoked from the page allocator */ 59 unsigned for_reclaim:1; /* Invoked from the page allocator */
60 unsigned for_writepages:1; /* This is a writepages() call */ 60 unsigned for_writepages:1; /* This is a writepages() call */
61 unsigned range_cyclic:1; /* range_start is cyclic */ 61 unsigned range_cyclic:1; /* range_start is cyclic */
62
63 void *fs_private; /* For use by ->writepages() */
62}; 64};
63 65
64/* 66/*