Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net> 于2024年12月26日周四 21:32写道: > > On 2024/12/24 19:46, zangyangyang1 via Linux-f2fs-devel wrote: > > When f2fs_write_single_data_page fails, f2fs_write_cache_pages > > will use the last 'submitted' value incorrectly, which will cause > > 'nwritten' and 'wbc->nr_to_write' calculation errors > > > Signed-off-by: zangyangyang1 <zangyangya...@xiaomi.com> > > --- > > fs/f2fs/data.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > > index 94f7b084f601..083acd7f5420 100644 > > --- a/fs/f2fs/data.c > > +++ b/fs/f2fs/data.c > > @@ -3179,6 +3179,7 @@ static int f2fs_write_cache_pages(struct > > address_space *mapping, > > continue; > > } > > #endif > > + submitted = 0; > > How about initializing "submitted" in f2fs_write_single_data_page() > to cover all cases in where we call f2fs_write_single_data_page()? Hi, My first change was in f2fs_write_single_data_page(), but that added two lines of code, so I put the change in f2fs_write_cache_pages(), but I forgot that compression also calls f2fs_write_single_data_page(), I will fix it. Thanks, > Thanks, > > > ret = f2fs_write_single_data_page(folio, > > &submitted, &bio, &last_block, > > wbc, io_type, 0, true); > > -- > > 2.43.2 > > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel