diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-11-01 10:08:06 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-11-06 03:03:48 -0500 |
commit | 01d658f2ca3c85c1ffb20b306e30d16197000ce7 (patch) | |
tree | eda62586bb95967a4001f8fb70e6955b531cf801 /fs/btrfs/extent_io.h | |
parent | e688b7252f784c2479d559f9f70ca8354752c5e7 (diff) |
Btrfs: make sure to flush queued bios if write_cache_pages waits
write_cache_pages tries to build up a large bio to stuff down the pipe.
But if it needs to wait for a page lock, it needs to make sure and send
down any pending writes so we don't deadlock with anyone who has the
page lock and is waiting for writeback of things inside the bio.
Dave Sterba triggered this as a deadlock between the autodefrag code and
the extent write_cache_pages
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 325a346369da..cbd4824a7c94 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -86,7 +86,8 @@ struct extent_io_ops { | |||
86 | struct extent_state *other); | 86 | struct extent_state *other); |
87 | void (*split_extent_hook)(struct inode *inode, | 87 | void (*split_extent_hook)(struct inode *inode, |
88 | struct extent_state *orig, u64 split); | 88 | struct extent_state *orig, u64 split); |
89 | int (*write_cache_pages_lock_hook)(struct page *page); | 89 | int (*write_cache_pages_lock_hook)(struct page *page, void *data, |
90 | void (*flush_fn)(void *)); | ||
90 | }; | 91 | }; |
91 | 92 | ||
92 | struct extent_io_tree { | 93 | struct extent_io_tree { |