summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-09-25 15:36:00 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-06 13:05:16 +0100
commitb619de076f9c9a17cb454f5e54b9c13740125c07 (patch)
tree49c2194918ccc614106fa440cfc5e7aab41ff937 /fs
parent23848022460fa4dc88b0b69b819c9fb15c75ff56 (diff)
downloadlinux-stable-b619de076f9c9a17cb454f5e54b9c13740125c07.tar.gz
linux-stable-b619de076f9c9a17cb454f5e54b9c13740125c07.tar.bz2
linux-stable-b619de076f9c9a17cb454f5e54b9c13740125c07.zip
f2fs: fix to recover inode's i_gc_failures during POR
[ Upstream commit 7de36cf3e4087207f42a88992f8cb615a1bd902e ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/recovery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 0b224f4a4a65..281ba46b5b35 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -226,6 +226,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);