Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
"Two fixes in this pull request:

- The writeback regression fix from Tejun, which has been weeks in
the making. This fixes a case where we would sometimes not issue
writeback when we should have.

- An older fix for a memory corruption issue in mtip32xx. It was
deferred since we wanted a better fix for this (driver should not
have to handle that case), but given the timing, it's better to put
the simple fix in for 4.2 release"

* 'for-linus' of git://git.kernel.dk/linux-block:
mtip32x: fix regression introduced by blk-mq per-hctx flush
writeback: sync_inodes_sb() must write out I_DIRTY_TIME inodes and always call wait_sb_inodes()

+21 -9
+8
drivers/block/mtip32xx/mtip32xx.c
··· 3756 3756 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq); 3757 3757 u32 host_cap_64 = readl(dd->mmio + HOST_CAP) & HOST_CAP_64; 3758 3758 3759 + /* 3760 + * For flush requests, request_idx starts at the end of the 3761 + * tag space. Since we don't support FLUSH/FUA, simply return 3762 + * 0 as there's nothing to be done. 3763 + */ 3764 + if (request_idx >= MTIP_MAX_COMMAND_SLOTS) 3765 + return 0; 3766 + 3759 3767 cmd->command = dmam_alloc_coherent(&dd->pdev->dev, CMD_DMA_ALLOC_SZ, 3760 3768 &cmd->command_dma, GFP_KERNEL); 3761 3769 if (!cmd->command)
+13 -9
fs/fs-writeback.c
··· 844 844 struct wb_iter iter; 845 845 846 846 might_sleep(); 847 - 848 - if (!bdi_has_dirty_io(bdi)) 849 - return; 850 847 restart: 851 848 rcu_read_lock(); 852 849 bdi_for_each_wb(wb, bdi, &iter, next_blkcg_id) { 853 - if (!wb_has_dirty_io(wb) || 854 - (skip_if_busy && writeback_in_progress(wb))) 850 + /* SYNC_ALL writes out I_DIRTY_TIME too */ 851 + if (!wb_has_dirty_io(wb) && 852 + (base_work->sync_mode == WB_SYNC_NONE || 853 + list_empty(&wb->b_dirty_time))) 854 + continue; 855 + if (skip_if_busy && writeback_in_progress(wb)) 855 856 continue; 856 857 857 858 base_work->nr_pages = wb_split_bdi_pages(wb, nr_pages); ··· 900 899 { 901 900 might_sleep(); 902 901 903 - if (bdi_has_dirty_io(bdi) && 904 - (!skip_if_busy || !writeback_in_progress(&bdi->wb))) { 902 + if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) { 905 903 base_work->auto_free = 0; 906 904 base_work->single_wait = 0; 907 905 base_work->single_done = 0; ··· 2275 2275 }; 2276 2276 struct backing_dev_info *bdi = sb->s_bdi; 2277 2277 2278 - /* Nothing to do? */ 2279 - if (!bdi_has_dirty_io(bdi) || bdi == &noop_backing_dev_info) 2278 + /* 2279 + * Can't skip on !bdi_has_dirty() because we should wait for !dirty 2280 + * inodes under writeback and I_DIRTY_TIME inodes ignored by 2281 + * bdi_has_dirty() need to be written out too. 2282 + */ 2283 + if (bdi == &noop_backing_dev_info) 2280 2284 return; 2281 2285 WARN_ON(!rwsem_is_locked(&sb->s_umount)); 2282 2286