Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92bf9c41 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

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: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 7a35dd56
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);