lkml.org 
[lkml]   [2018]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [f2fs-dev] [PATCH] f2fs: prevent newly created inode from being dirtied incorrectly
From
Date
On 2018/1/11 10:26, Daeho Jeong wrote:
> Now, we invoke f2fs_mark_inode_dirty_sync() to make an inode dirty in
> advance of creating a new node page for the inode. By this, some inodes
> whose node page is not created yet can be linked into the global dirty
> list.
>
> If the checkpoint is executed at this moment, the inode will be written
> back by writeback_single_inode() and finally update_inode_page() will
> fail to detach the inode from the global dirty list because the inode
> doesn't have a node page.
>
> The problem is that the inode's state in VFS layer will become clean
> after execution of writeback_single_inode() and it's still linked in
> the global dirty list of f2fs and this will cause a kernel panic.
>
> So, we will prevent the newly created inode from being dirtied during
> the FI_NEW_INODE flag of the inode is set. We will make it dirty
> right after the flag is cleared.
>
> Signed-off-by: Daeho Jeong <daeho.jeong@samsung.com>
> Signed-off-by: Youngjin Gil <youngjin.gil@samsung.com>
> Tested-by: Hobin Woo <hobin.woo@samsung.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

\
 
 \ /
  Last update: 2018-01-14 23:22    [W:0.031 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site