• Jaegeuk Kim's avatar
    f2fs: account read IOs and use IO counts for is_idle · 5f9abab4
    Jaegeuk Kim authored
    This patch adds issued read IO counts which is under block layer.
    
    Chao modified a bit, since:
    
    Below race can cause reversed reference on F2FS_RD_DATA, there is
    the same issue in f2fs_submit_page_bio(), fix them by relocate
    __submit_bio() and inc_page_count.
    
    Thread A			Thread B
    - f2fs_write_begin
     - f2fs_submit_page_read
     - __submit_bio
    				- f2fs_read_end_io
    				 - __read_end_io
    				 - dec_page_count(, F2FS_RD_DATA)
     - inc_page_count(, F2FS_RD_DATA)
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    5f9abab4
f2fs.h 112 KB