diff options
author | 2019-09-30 18:53:25 +0800 | |
---|---|---|
committer | 2019-10-25 09:52:03 -0700 | |
commit | 0b20fcec8651569935a10afe03fedc0b812d044e (patch) | |
tree | 1af24a3aeba92ed7910a5335f50072142343341f /drivers/usb/cdns3/cdns3-imx.c | |
parent | f2fs: fix to avoid memory leakage in f2fs_listxattr (diff) | |
download | wireguard-linux-0b20fcec8651569935a10afe03fedc0b812d044e.tar.xz wireguard-linux-0b20fcec8651569935a10afe03fedc0b812d044e.zip |
f2fs: cache global IPU bio
In commit 8648de2c581e ("f2fs: add bio cache for IPU"), we added
f2fs_submit_ipu_bio() in __write_data_page() as below:
__write_data_page()
if (!S_ISDIR(inode->i_mode) && !IS_NOQUOTA(inode)) {
f2fs_submit_ipu_bio(sbi, bio, page);
....
}
in order to avoid below deadlock:
Thread A Thread B
- __write_data_page (inode x, page y)
- f2fs_do_write_data_page
- set_page_writeback ---- set writeback flag in page y
- f2fs_inplace_write_data
- f2fs_balance_fs
- lock gc_mutex
- lock gc_mutex
- f2fs_gc
- do_garbage_collect
- gc_data_segment
- move_data_page
- f2fs_wait_on_page_writeback
- wait_on_page_writeback --- wait writeback of page y
However, the bio submission breaks the merge of IPU IOs.
So in this patch let's add a global bio cache for merged IPU pages,
then f2fs_wait_on_page_writeback() is able to submit bio if a
writebacked page is cached in global bio cache.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions