* [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them
@ 2020-05-15 2:15 Jaegeuk Kim
2020-05-15 6:29 ` Chao Yu
0 siblings, 1 reply; 5+ messages in thread
From: Jaegeuk Kim @ 2020-05-15 2:15 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Jaegeuk Kim
Let's guarantee flusing dirty meta pages to avoid infinite loop.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/checkpoint.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 620a386d82c1a..9a7f695d5adb3 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1266,6 +1266,9 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
if (unlikely(f2fs_cp_error(sbi)))
break;
+ if (type == F2FS_DIRTY_META)
+ f2fs_sync_meta_pages(sbi, META, LONG_MAX,
+ FS_CP_META_IO);
io_schedule_timeout(DEFAULT_IO_TIMEOUT);
}
finish_wait(&sbi->cp_wait, &wait);
@@ -1493,8 +1496,6 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
sbi->last_valid_block_count = sbi->total_valid_block_count;
percpu_counter_set(&sbi->alloc_valid_block_count, 0);
- /* Here, we have one bio having CP pack except cp pack 2 page */
- f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO);
/* Wait for all dirty meta pages to be submitted for IO */
f2fs_wait_on_all_pages(sbi, F2FS_DIRTY_META);
--
2.26.2.761.g0e0b3e54be-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them
2020-05-15 2:15 [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them Jaegeuk Kim
@ 2020-05-15 6:29 ` Chao Yu
2020-05-15 14:45 ` Jaegeuk Kim
0 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2020-05-15 6:29 UTC (permalink / raw)
To: Jaegeuk Kim, linux-kernel, linux-f2fs-devel, kernel-team
On 2020/5/15 10:15, Jaegeuk Kim wrote:
> Let's guarantee flusing dirty meta pages to avoid infinite loop.
What's the root cause? Race case or meta page flush failure?
Thanks,
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/checkpoint.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 620a386d82c1a..9a7f695d5adb3 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -1266,6 +1266,9 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
> if (unlikely(f2fs_cp_error(sbi)))
> break;
>
> + if (type == F2FS_DIRTY_META)
> + f2fs_sync_meta_pages(sbi, META, LONG_MAX,
> + FS_CP_META_IO);
> io_schedule_timeout(DEFAULT_IO_TIMEOUT);
> }
> finish_wait(&sbi->cp_wait, &wait);
> @@ -1493,8 +1496,6 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
> sbi->last_valid_block_count = sbi->total_valid_block_count;
> percpu_counter_set(&sbi->alloc_valid_block_count, 0);
>
> - /* Here, we have one bio having CP pack except cp pack 2 page */
> - f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO);
> /* Wait for all dirty meta pages to be submitted for IO */
> f2fs_wait_on_all_pages(sbi, F2FS_DIRTY_META);
>
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them
2020-05-15 6:29 ` Chao Yu
@ 2020-05-15 14:45 ` Jaegeuk Kim
2020-05-18 2:21 ` Chao Yu
0 siblings, 1 reply; 5+ messages in thread
From: Jaegeuk Kim @ 2020-05-15 14:45 UTC (permalink / raw)
To: Chao Yu; +Cc: kernel-team, linux-kernel, linux-f2fs-devel
On 05/15, Chao Yu wrote:
> On 2020/5/15 10:15, Jaegeuk Kim wrote:
> > Let's guarantee flusing dirty meta pages to avoid infinite loop.
>
> What's the root cause? Race case or meta page flush failure?
Investigating, but at least, this can avoid the inifinite loop there.
V2:
From c60ce8e7178004fd6cba96e592247e43b5fd98d8 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Wed, 13 May 2020 21:12:53 -0700
Subject: [PATCH] f2fs: flush dirty meta pages when flushing them
Let's guarantee flusing dirty meta pages to avoid infinite loop.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/checkpoint.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 620a386d82c1a..3dc3ac6fe1432 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1266,6 +1266,9 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
if (unlikely(f2fs_cp_error(sbi)))
break;
+ if (type == F2FS_DIRTY_META)
+ f2fs_sync_meta_pages(sbi, META, LONG_MAX,
+ FS_CP_META_IO);
io_schedule_timeout(DEFAULT_IO_TIMEOUT);
}
finish_wait(&sbi->cp_wait, &wait);
--
2.26.2.761.g0e0b3e54be-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them
2020-05-15 14:45 ` Jaegeuk Kim
@ 2020-05-18 2:21 ` Chao Yu
2020-05-18 17:54 ` Jaegeuk Kim
0 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2020-05-18 2:21 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: kernel-team, linux-kernel, linux-f2fs-devel
On 2020/5/15 22:45, Jaegeuk Kim wrote:
> On 05/15, Chao Yu wrote:
>> On 2020/5/15 10:15, Jaegeuk Kim wrote:
>>> Let's guarantee flusing dirty meta pages to avoid infinite loop.
>>
>> What's the root cause? Race case or meta page flush failure?
>
> Investigating, but at least, this can avoid the inifinite loop there.
Hmm... this fix may cover the root cause..
Thanks,
>
> V2:
>
>>From c60ce8e7178004fd6cba96e592247e43b5fd98d8 Mon Sep 17 00:00:00 2001
> From: Jaegeuk Kim <jaegeuk@kernel.org>
> Date: Wed, 13 May 2020 21:12:53 -0700
> Subject: [PATCH] f2fs: flush dirty meta pages when flushing them
>
> Let's guarantee flusing dirty meta pages to avoid infinite loop.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/checkpoint.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index 620a386d82c1a..3dc3ac6fe1432 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -1266,6 +1266,9 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
> if (unlikely(f2fs_cp_error(sbi)))
> break;
>
> + if (type == F2FS_DIRTY_META)
> + f2fs_sync_meta_pages(sbi, META, LONG_MAX,
> + FS_CP_META_IO);
> io_schedule_timeout(DEFAULT_IO_TIMEOUT);
> }
> finish_wait(&sbi->cp_wait, &wait);
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them
2020-05-18 2:21 ` Chao Yu
@ 2020-05-18 17:54 ` Jaegeuk Kim
0 siblings, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2020-05-18 17:54 UTC (permalink / raw)
To: Chao Yu; +Cc: kernel-team, linux-kernel, linux-f2fs-devel
On 05/18, Chao Yu wrote:
> On 2020/5/15 22:45, Jaegeuk Kim wrote:
> > On 05/15, Chao Yu wrote:
> >> On 2020/5/15 10:15, Jaegeuk Kim wrote:
> >>> Let's guarantee flusing dirty meta pages to avoid infinite loop.
> >>
> >> What's the root cause? Race case or meta page flush failure?
> >
> > Investigating, but at least, this can avoid the inifinite loop there.
>
> Hmm... this fix may cover the root cause..
We're getting reached out to one related to this issue where single SSA
page is dirtied at the moment. Anyway, I think it'd be fine to get this
as we can detect any fs consistency issue by fsck. So far, I haven't seen
any problem in all my local stress tests.
>
> Thanks,
>
> >
> > V2:
> >
> >>From c60ce8e7178004fd6cba96e592247e43b5fd98d8 Mon Sep 17 00:00:00 2001
> > From: Jaegeuk Kim <jaegeuk@kernel.org>
> > Date: Wed, 13 May 2020 21:12:53 -0700
> > Subject: [PATCH] f2fs: flush dirty meta pages when flushing them
> >
> > Let's guarantee flusing dirty meta pages to avoid infinite loop.
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> > fs/f2fs/checkpoint.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> > index 620a386d82c1a..3dc3ac6fe1432 100644
> > --- a/fs/f2fs/checkpoint.c
> > +++ b/fs/f2fs/checkpoint.c
> > @@ -1266,6 +1266,9 @@ void f2fs_wait_on_all_pages(struct f2fs_sb_info *sbi, int type)
> > if (unlikely(f2fs_cp_error(sbi)))
> > break;
> >
> > + if (type == F2FS_DIRTY_META)
> > + f2fs_sync_meta_pages(sbi, META, LONG_MAX,
> > + FS_CP_META_IO);
> > io_schedule_timeout(DEFAULT_IO_TIMEOUT);
> > }
> > finish_wait(&sbi->cp_wait, &wait);
> >
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-18 17:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 2:15 [f2fs-dev] [PATCH] f2fs: flush dirty meta pages when flushing them Jaegeuk Kim
2020-05-15 6:29 ` Chao Yu
2020-05-15 14:45 ` Jaegeuk Kim
2020-05-18 2:21 ` Chao Yu
2020-05-18 17:54 ` Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).