aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-11-17 20:53:11 +0800
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:34:29 +0200
commit134e5fc7e9c19db05289c803957ccd9814f7473b (patch)
treeb5c6f347e12710643f52ffabe2543977437fa9b0 /include/linux
parent78281dd59c3f7ea82a6079033bf625c228e7c4d4 (diff)
f2fs: fix to account total free nid correctly
Thread A Thread B Thread C - f2fs_create - f2fs_new_inode - f2fs_lock_op - alloc_nid alloc last nid - f2fs_unlock_op - f2fs_create - f2fs_new_inode - f2fs_lock_op - alloc_nid as node count still not be increased, we will loop in alloc_nid - f2fs_write_node_pages - f2fs_balance_fs_bg - f2fs_sync_fs - write_checkpoint - block_operations - f2fs_lock_all - f2fs_lock_op While creating new inode, we do not allocate and account nid atomically, so that when there is almost no free nids left, we may encounter deadloop like above stack. In order to avoid that, reuse nm_i::available_nids for accounting free nids and make nid allocation and counting being atomical during node creation. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions