kernel-ark/fs/f2fs
Jaegeuk Kim 6f85b35203 f2fs: avoid RECLAIM_FS-ON-W: deadlock
This patch tries to avoid the following deadlock condition of which the reclaim
path can trigger f2fs_balance_fs again.

=================================
[ INFO: inconsistent lock state ]
---------------------------------
inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
kswapd0/41 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&sbi->gc_mutex){+.+.?.}, at: f2fs_balance_fs+0xe6/0x100 [f2fs]
{RECLAIM_FS-ON-W} state was registered at:
  [<ffffffff810aa5a9>] mark_held_locks+0xb9/0x140
  [<ffffffff810aae85>] lockdep_trace_alloc+0x85/0xf0
  [<ffffffff8113ab2c>] __alloc_pages_nodemask+0x7c/0x9b0
  [<ffffffff81175aa8>] alloc_pages_current+0xb8/0x180
  [<ffffffff811319cf>] __page_cache_alloc+0xaf/0xd0
  [<ffffffff8113225c>] find_or_create_page+0x4c/0xb0
  [<ffffffffa021359e>] find_data_page+0x14e/0x210 [f2fs]
  [<ffffffffa021161b>] f2fs_gc+0x9eb/0xd90 [f2fs]
  [<ffffffffa0218fae>] f2fs_balance_fs+0xee/0x100 [f2fs]
  [<ffffffffa020848c>] f2fs_setattr+0x6c/0x200 [f2fs]
  [<ffffffff811ae51b>] notify_change+0x1db/0x3a0
  [<ffffffff8118fbd0>] do_truncate+0x60/0xa0
  [<ffffffff8118fd95>] vfs_truncate+0x185/0x1b0
  [<ffffffff8118fe1c>] do_sys_truncate+0x5c/0xa0
  [<ffffffff8118ffee>] SyS_truncate+0xe/0x10
  [<ffffffff816e2b42>] system_call_fastpath+0x16/0x1b

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-05-28 15:03:03 +09:00
..
acl.c mode_t, whack-a-mole at 11... 2013-04-09 14:13:05 -04:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: fix BUG_ON during f2fs_evict_inode(dir) 2013-05-28 15:03:01 +09:00
data.c f2fs: avoid RECLAIM_FS-ON-W: deadlock 2013-05-28 15:03:03 +09:00
debug.c f2fs: use list_for_each_entry rather than list_for_each_entry_safe 2013-05-28 15:03:02 +09:00
dir.c f2fs: update inode page after creation 2013-05-28 15:03:02 +09:00
f2fs.h f2fs, lockdep: annotate mutex_lock_all() 2013-05-28 15:03:02 +09:00
file.c f2fs: reorganize f2fs_vm_page_mkwrite 2013-05-28 15:03:02 +09:00
gc.c f2fs: remove useless #include <linux/proc_fs.h> as we're now using sysfs as debug entry. 2013-04-30 12:07:32 +09:00
gc.h f2fs: avoid frequent background GC 2013-04-26 10:35:03 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: avoid RECLAIM_FS-ON-W: deadlock 2013-05-28 15:03:03 +09:00
Kconfig f2fs: resolve build failures 2012-12-11 13:43:43 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: remove unnecessary por_doing check 2013-05-28 15:03:01 +09:00
node.c f2fs: add debug msgs in the recovery routine 2013-05-28 15:03:02 +09:00
node.h f2fs: fix the logic of IS_DNODE() 2013-04-09 18:21:24 +09:00
recovery.c f2fs: don't do checkpoint if error is occurred 2013-05-28 15:03:03 +09:00
segment.c f2fs: remove unecessary variable and code 2013-05-28 15:03:02 +09:00
segment.h f2fs: modify the number of issued pages to merge IOs 2013-04-30 12:07:32 +09:00
super.c f2fs updates for v3.10 2013-05-08 15:11:48 -07:00
xattr.c f2fs: introduce a new global lock scheme 2013-04-09 18:21:18 +09:00
xattr.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00