mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
f2fs: commit atomic written page in LFS mode
We should always commit atomic written pages in LFS mode, otherwise data will become corrupted if we encounter suddent power cut after partial pages committed in IPU mode. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
246e22992c
commit
94b23d0bf6
1 changed files with 1 additions and 0 deletions
|
@ -1084,6 +1084,7 @@ int do_write_data_page(struct f2fs_io_info *fio)
|
|||
*/
|
||||
if (unlikely(fio->blk_addr != NEW_ADDR &&
|
||||
!is_cold_data(page) &&
|
||||
!IS_ATOMIC_WRITTEN_PAGE(page) &&
|
||||
need_inplace_update(inode))) {
|
||||
rewrite_data_page(fio);
|
||||
set_inode_flag(F2FS_I(inode), FI_UPDATE_WRITE);
|
||||
|
|
Loading…
Reference in a new issue