lkml.org 
[lkml]   [2019]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] f2fs: Fix direct IO handling
From
Date
On 2019/12/4 1:33, Jaegeuk Kim wrote:
> Thank you for checking the patch.
> I found some regressions in xfstests, so want to follow the Damien's one
> like below.
>
> Thanks,
>
> ===
>>From 9df6f09e3a09ed804aba4b56ff7cd9524c002e69 Mon Sep 17 00:00:00 2001
> From: Jaegeuk Kim <jaegeuk@kernel.org>
> Date: Tue, 26 Nov 2019 15:01:42 -0800
> Subject: [PATCH] f2fs: preallocate DIO blocks when forcing buffered_io
>
> The previous preallocation and DIO decision like below.
>
> allow_outplace_dio !allow_outplace_dio
> f2fs_force_buffered_io (*) No_Prealloc / Buffered_IO Prealloc / Buffered_IO
> !f2fs_force_buffered_io No_Prealloc / DIO Prealloc / DIO
>
> But, Javier reported Case (*) where zoned device bypassed preallocation but
> fell back to buffered writes in f2fs_direct_IO(), resulting in stale data
> being read.
>
> In order to fix the issue, actually we need to preallocate blocks whenever
> we fall back to buffered IO like this. No change is made in the other cases.
>
> allow_outplace_dio !allow_outplace_dio
> f2fs_force_buffered_io (*) Prealloc / Buffered_IO Prealloc / Buffered_IO
> !f2fs_force_buffered_io No_Prealloc / DIO Prealloc / DIO
>
> Reported-and-tested-by: Javier Gonzalez <javier@javigon.com>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

\
 
 \ /
  Last update: 2019-12-04 02:28    [W:0.067 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site