f2fs: fix to recover inode's i_gc_failures during POR

inode.i_gc_failures is used to indicate that skip count of migrating
on blocks of inode, we should guarantee it can be recovered in sudden
power-off case.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2018-09-25 15:36:00 +08:00 коммит произвёл Jaegeuk Kim
Родитель 19c73a691c
Коммит 7de36cf3e4
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -234,6 +234,8 @@ static void recover_inode(struct inode *inode, struct page *page)
F2FS_I(inode)->i_advise = raw->i_advise;
F2FS_I(inode)->i_flags = le32_to_cpu(raw->i_flags);
F2FS_I(inode)->i_gc_failures[GC_FAILURE_PIN] =
le16_to_cpu(raw->i_gc_failures);
recover_inline_flags(inode, raw);