]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
f2fs: flush cp pack except cp pack 2 page at first
authorGao Xiang <hsiangkao@aol.com>
Sat, 10 Feb 2018 04:12:51 +0000 (12:12 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commitfbb326ac28831b916b7ea14a2467bbb5dbea8702
treee0393356ce96687c2f2d0dcb4a9aa390ed29c82f
parent3caa412b147d0337984214730a7e8007ba6fae21
f2fs: flush cp pack except cp pack 2 page at first

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 46706d5917f4457a6befe7a39a15c89dbb1ce9ca ]

Previously, we attempt to flush the whole cp pack in a single bio,
however, when suddenly powering off at this time, we could get into
an extreme scenario that cp pack 1 page and cp pack 2 page are updated
and latest, but payload or current summaries are still partially
outdated. (see reliable write in the UFS specification)

This patch submits the whole cp pack except cp pack 2 page at first,
and then writes the cp pack 2 page with an extra independent
bio with pre-io barrier.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/f2fs/checkpoint.c