* [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p3> @ 2023-02-16 2:57 ` Yonggil Song 2023-02-16 7:01 ` Miko Larsson 2023-02-16 7:28 ` Yonggil Song 1 sibling, 1 reply; 9+ messages in thread From: Yonggil Song @ 2023-02-16 2:57 UTC (permalink / raw) To: Chao Yu, jaegeuk, linux-f2fs-devel, linux-kernel; +Cc: Seokhwan Kim When f2fs skipped a gc round during victim migration, there was a bug which would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem was not initialized. It fixes the bug by correctly initializing the skipped_gc_rwsem inside the gc loop. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off-by: Yonggil Song <yonggil.song@samsung.com> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control) prefree_segments(sbi)); cpc.reason = __get_cp_reason(sbi); - sbi->skipped_gc_rwsem = 0; gc_more: + sbi->skipped_gc_rwsem = 0; if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { ret = -EINVAL; goto stop; -- 2.34.1 _______________________________________________ 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] 9+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem 2023-02-16 2:57 ` [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem Yonggil Song @ 2023-02-16 7:01 ` Miko Larsson 0 siblings, 0 replies; 9+ messages in thread From: Miko Larsson @ 2023-02-16 7:01 UTC (permalink / raw) To: yonggil.song, Chao Yu, jaegeuk, linux-f2fs-devel, linux-kernel Cc: Seokhwan Kim On Thu, 2023-02-16 at 11:57 +0900, Yonggil Song wrote: > When f2fs skipped a gc round during victim migration, there was a bug > which > would skip all upcoming gc rounds unconditionally because > skipped_gc_rwsem > was not initialized. It fixes the bug by correctly initializing the > skipped_gc_rwsem inside the gc loop. > > Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") > Signed-off-by: Yonggil Song <yonggil.song@samsung.com> > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index b22f49a6f128..81d326abaac1 100644 > --- a/fs/f2fs/gc.c > +++ b/fs/f2fs/gc.c > @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct > f2fs_gc_control *gc_control) > prefree_segments(sbi)); > > cpc.reason = __get_cp_reason(sbi); > - sbi->skipped_gc_rwsem = 0; > gc_more: > + sbi->skipped_gc_rwsem = 0; > if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { > ret = -EINVAL; > goto stop; Might want to Cc the stable mailing list. -- ~miko _______________________________________________ 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] 9+ messages in thread
* [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p3> 2023-02-16 2:57 ` [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem Yonggil Song @ 2023-02-16 7:28 ` Yonggil Song 1 sibling, 0 replies; 9+ messages in thread From: Yonggil Song @ 2023-02-16 7:28 UTC (permalink / raw) To: Chao Yu, jaegeuk, linux-f2fs-devel, linux-kernel, daehojeong Cc: Seokhwan Kim, gregkh, stable When f2fs skipped a gc round during victim migration, there was a bug which would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem was not initialized. It fixes the bug by correctly initializing the skipped_gc_rwsem inside the gc loop. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off-by: Yonggil Song <yonggil.song@samsung.com> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control) prefree_segments(sbi)); cpc.reason = __get_cp_reason(sbi); - sbi->skipped_gc_rwsem = 0; gc_more: + sbi->skipped_gc_rwsem = 0; if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { ret = -EINVAL; goto stop; -- 2.34.1 _______________________________________________ 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] 9+ messages in thread
[parent not found: <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p4>]
* [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p4> @ 2023-02-16 7:44 ` Yonggil Song 2023-02-16 7:46 ` gregkh 2023-03-13 20:20 ` patchwork-bot+f2fs 0 siblings, 2 replies; 9+ messages in thread From: Yonggil Song @ 2023-02-16 7:44 UTC (permalink / raw) To: Chao Yu, jaegeuk, linux-f2fs-devel, linux-kernel, daehojeong Cc: gregkh, stable When f2fs skipped a gc round during victim migration, there was a bug which would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem was not initialized. It fixes the bug by correctly initializing the skipped_gc_rwsem inside the gc loop. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Cc: stable@vger.kernel.org Signed-off-by: Yonggil Song <yonggil.song@samsung.com> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control) prefree_segments(sbi)); cpc.reason = __get_cp_reason(sbi); - sbi->skipped_gc_rwsem = 0; gc_more: + sbi->skipped_gc_rwsem = 0; if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { ret = -EINVAL; goto stop; -- 2.34.1 _______________________________________________ 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] 9+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem 2023-02-16 7:44 ` Yonggil Song @ 2023-02-16 7:46 ` gregkh 2023-03-13 20:20 ` patchwork-bot+f2fs 1 sibling, 0 replies; 9+ messages in thread From: gregkh @ 2023-02-16 7:46 UTC (permalink / raw) To: Yonggil Song; +Cc: daehojeong, linux-kernel, stable, linux-f2fs-devel, jaegeuk On Thu, Feb 16, 2023 at 04:44:27PM +0900, Yonggil Song wrote: > When f2fs skipped a gc round during victim migration, there was a bug which > would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem > was not initialized. It fixes the bug by correctly initializing the > skipped_gc_rwsem inside the gc loop. > > Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") > Cc: stable@vger.kernel.org > Signed-off-by: Yonggil Song <yonggil.song@samsung.com> > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index b22f49a6f128..81d326abaac1 100644 > --- a/fs/f2fs/gc.c > +++ b/fs/f2fs/gc.c > @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control) > prefree_segments(sbi)); > > cpc.reason = __get_cp_reason(sbi); > - sbi->skipped_gc_rwsem = 0; > gc_more: > + sbi->skipped_gc_rwsem = 0; > if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { > ret = -EINVAL; > goto stop; > -- > 2.34.1 Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot _______________________________________________ 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] 9+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem 2023-02-16 7:44 ` Yonggil Song 2023-02-16 7:46 ` gregkh @ 2023-03-13 20:20 ` patchwork-bot+f2fs 1 sibling, 0 replies; 9+ messages in thread From: patchwork-bot+f2fs @ 2023-03-13 20:20 UTC (permalink / raw) To: Yonggil Song Cc: daehojeong, gregkh, linux-kernel, stable, linux-f2fs-devel, jaegeuk Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Thu, 16 Feb 2023 16:44:27 +0900 you wrote: > When f2fs skipped a gc round during victim migration, there was a bug which > would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem > was not initialized. It fixes the bug by correctly initializing the > skipped_gc_rwsem inside the gc loop. > > Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") > Cc: stable@vger.kernel.org > Signed-off-by: Yonggil Song <yonggil.song@samsung.com> Here is the summary with links: - [f2fs-dev,v2] f2fs: fix uninitialized skipped_gc_rwsem https://git.kernel.org/jaegeuk/f2fs/c/196036c45f8c You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ 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] 9+ messages in thread
[parent not found: <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p7>]
* [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p7> @ 2023-02-16 7:13 ` Yonggil Song 2023-03-06 21:51 ` Jaegeuk Kim 0 siblings, 1 reply; 9+ messages in thread From: Yonggil Song @ 2023-02-16 7:13 UTC (permalink / raw) To: Chao Yu, jaegeuk, linux-f2fs-devel, linux-kernel, daehojeong; +Cc: Seokhwan Kim When f2fs skipped a gc round during victim migration, there was a bug which would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem was not initialized. It fixes the bug by correctly initializing the skipped_gc_rwsem inside the gc loop. Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off-by: Yonggil Song <yonggil.song@samsung.com> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b22f49a6f128..81d326abaac1 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control) prefree_segments(sbi)); cpc.reason = __get_cp_reason(sbi); - sbi->skipped_gc_rwsem = 0; gc_more: + sbi->skipped_gc_rwsem = 0; if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { ret = -EINVAL; goto stop; -- 2.34.1 _______________________________________________ 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] 9+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem 2023-02-16 7:13 ` Yonggil Song @ 2023-03-06 21:51 ` Jaegeuk Kim 2023-03-13 6:11 ` Chao Yu 0 siblings, 1 reply; 9+ messages in thread From: Jaegeuk Kim @ 2023-03-06 21:51 UTC (permalink / raw) To: Yonggil Song; +Cc: daehojeong, linux-kernel, linux-f2fs-devel, Seokhwan Kim On 02/16, Yonggil Song wrote: > When f2fs skipped a gc round during victim migration, there was a bug which > would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem > was not initialized. It fixes the bug by correctly initializing the > skipped_gc_rwsem inside the gc loop. > > Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Applied with the below fix. Fixes: 6f8d4455060d ("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc" > Signed-off-by: Yonggil Song <yonggil.song@samsung.com> > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index b22f49a6f128..81d326abaac1 100644 > --- a/fs/f2fs/gc.c > +++ b/fs/f2fs/gc.c > @@ -1786,8 +1786,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control) > prefree_segments(sbi)); > > cpc.reason = __get_cp_reason(sbi); > - sbi->skipped_gc_rwsem = 0; > gc_more: > + sbi->skipped_gc_rwsem = 0; > if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) { > ret = -EINVAL; > goto stop; > -- > 2.34.1 _______________________________________________ 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] 9+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem 2023-03-06 21:51 ` Jaegeuk Kim @ 2023-03-13 6:11 ` Chao Yu 0 siblings, 0 replies; 9+ messages in thread From: Chao Yu @ 2023-03-13 6:11 UTC (permalink / raw) To: Jaegeuk Kim, Yonggil Song Cc: Seokhwan Kim, daehojeong, linux-kernel, linux-f2fs-devel On 2023/3/7 5:51, Jaegeuk Kim wrote: > Applied with the below fix. > > Fixes: 6f8d4455060d ("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc" ')' was missed. > >> Signed-off-by: Yonggil Song <yonggil.song@samsung.com> Reviewed-by: Chao Yu <chao@kernel.org> Thanks, _______________________________________________ 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] 9+ messages in thread
end of thread, other threads:[~2023-03-13 20:20 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p3> 2023-02-16 2:57 ` [f2fs-dev] [PATCH v2] f2fs: fix uninitialized skipped_gc_rwsem Yonggil Song 2023-02-16 7:01 ` Miko Larsson 2023-02-16 7:28 ` Yonggil Song [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p4> 2023-02-16 7:44 ` Yonggil Song 2023-02-16 7:46 ` gregkh 2023-03-13 20:20 ` patchwork-bot+f2fs [not found] <CGME20230215024850epcms2p22be2cc864d82b44f31c19a7ef28770b6@epcms2p7> 2023-02-16 7:13 ` Yonggil Song 2023-03-06 21:51 ` Jaegeuk Kim 2023-03-13 6:11 ` Chao Yu
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).