[PATCH v1] writback: remove WQ_MEM_RECLAIM flag in bdi_wq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if it write with the write back option with f2fs, kernel panic occurs.
Because the write back function uses bdi_wq and WQ_MEM_RECLAIM flag
is included and created.
However, this function calls f2fs_do_quota() of f2fs and finally tries to
perform quota_release_work.
the quota_release_work is performed in the events_unbound workqueue,
but the WQ_MEM_RECLAIM flag is not included.
Therefore, it causes warn_on_panic.

workqueue: WQ_MEM_RECLAIM writeback:wb_workfn is flushing !WQ_MEM_RECLAIM events_unbound:quota_release_workfn
Workqueue: writeback wb_workfn (flush-8:0)
Call trace:
 check_flush_dependency+0x160/0x16c
 __flush_work+0x168/0x738
 flush_delayed_work+0x58/0x70
 dquot_writeback_dquots+0x90/0x4bc
 f2fs_do_quota_sync+0x120/0x284
 f2fs_write_checkpoint+0x58c/0xe18
 f2fs_gc+0x3e8/0xd78
 f2fs_balance_fs+0x204/0x284
 f2fs_write_single_data_page+0x700/0xaf0
 f2fs_write_data_pages+0xe94/0x15bc
 do_writepages+0x170/0x3f8
 __writeback_single_inode+0xa0/0x8c4
 writeback_sb_inodes+0x2ac/0x708
 __writeback_inodes_wb+0xc0/0x118
 wb_writeback+0x1f4/0x664
 wb_workfn+0x62c/0x900
 process_one_work+0x3f8/0x968
 worker_thread+0x610/0x794
 kthread+0x1c4/0x1e4
 ret_from_fork+0x10/0x20

Signed-off-by: hy50.seo <hy50.seo@xxxxxxxxxxx>
---
 mm/backing-dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 783904d8c5ef..6ef5f23810fc 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -491,8 +491,7 @@ postcore_initcall(bdi_class_init);
 
 static int __init default_bdi_init(void)
 {
-	bdi_wq = alloc_workqueue("writeback", WQ_MEM_RECLAIM | WQ_UNBOUND |
-				 WQ_SYSFS, 0);
+	bdi_wq = alloc_workqueue("writeback", WQ_UNBOUND | WQ_SYSFS, 0);
 	if (!bdi_wq)
 		return -ENOMEM;
 	return 0;
-- 
2.26.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux