aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 6e35762b616..13edf7ad3ff 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1596,6 +1596,16 @@ EXPORT_SYMBOL(unmap_underlying_metadata);
1596 * locked buffer. This only can happen if someone has written the buffer 1596 * locked buffer. This only can happen if someone has written the buffer
1597 * directly, with submit_bh(). At the address_space level PageWriteback 1597 * directly, with submit_bh(). At the address_space level PageWriteback
1598 * prevents this contention from occurring. 1598 * prevents this contention from occurring.
1599 *
1600 * If block_write_full_page() is called with wbc->sync_mode ==
1601 * WB_SYNC_ALL, the writes are posted using WRITE_SYNC_PLUG; this
1602 * causes the writes to be flagged as synchronous writes, but the
1603 * block device queue will NOT be unplugged, since usually many pages
1604 * will be pushed to the out before the higher-level caller actually
1605 * waits for the writes to be completed. The various wait functions,
1606 * such as wait_on_writeback_range() will ultimately call sync_page()
1607 * which will ultimately call blk_run_backing_dev(), which will end up
1608 * unplugging the device queue.
1599 */ 1609 */
1600static int __block_write_full_page(struct inode *inode, struct page *page, 1610static int __block_write_full_page(struct inode *inode, struct page *page,
1601 get_block_t *get_block, struct writeback_control *wbc) 1611 get_block_t *get_block, struct writeback_control *wbc)
@@ -1606,7 +1616,8 @@ static int __block_write_full_page(struct inode *inode, struct page *page,
1606 struct buffer_head *bh, *head; 1616 struct buffer_head *bh, *head;
1607 const unsigned blocksize = 1 << inode->i_blkbits; 1617 const unsigned blocksize = 1 << inode->i_blkbits;
1608 int nr_underway = 0; 1618 int nr_underway = 0;
1609 int write_op = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE); 1619 int write_op = (wbc->sync_mode == WB_SYNC_ALL ?
1620 WRITE_SYNC_PLUG : WRITE);
1610 1621
1611 BUG_ON(!PageLocked(page)); 1622 BUG_ON(!PageLocked(page));
1612 1623