stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: init dirty_secmap incorrectly
@ 2020-12-01  7:45 Jack Qiu
  2020-12-02  1:52 ` [f2fs-dev] " Chao Yu
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Qiu @ 2020-12-01  7:45 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: stable

section is dirty, but dirty_secmap may not set

Reported-by: Jia Yang <jiayang5@huawei.com>
Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section
has several segments")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jack Qiu <jack.qiu@huawei.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1596502f7375..f2a4265318f5 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4544,7 +4544,7 @@ static void init_dirty_segmap(struct f2fs_sb_info *sbi)
 		return;

 	mutex_lock(&dirty_i->seglist_lock);
-	for (segno = 0; segno < MAIN_SECS(sbi); segno += blks_per_sec) {
+	for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) {
 		valid_blocks = get_valid_blocks(sbi, segno, true);
 		secno = GET_SEC_FROM_SEG(sbi, segno);

--
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: init dirty_secmap incorrectly
  2020-12-01  7:45 [PATCH] f2fs: init dirty_secmap incorrectly Jack Qiu
@ 2020-12-02  1:52 ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2020-12-02  1:52 UTC (permalink / raw)
  To: Jack Qiu, linux-f2fs-devel; +Cc: stable

On 2020/12/1 15:45, Jack Qiu wrote:
> section is dirty, but dirty_secmap may not set
> 
> Reported-by: Jia Yang <jiayang5@huawei.com>
> Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section
> has several segments")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Jack Qiu <jack.qiu@huawei.com>

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

Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] f2fs: init dirty_secmap incorrectly
  2020-11-30  7:37 Jack Qiu
@ 2020-11-30  8:11 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-11-30  8:11 UTC (permalink / raw)
  To: Jack Qiu; +Cc: linux-f2fs-devel, stable

On Mon, Nov 30, 2020 at 03:37:19PM +0800, Jack Qiu wrote:
> section is dirty, but dirty_secmap may not set
> 
> Reported-by: Jia Yang <jiayang5@huawei.com>
> Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section
> has several segments")
> 
> Signed-off-by: Jack Qiu <jack.qiu@huawei.com>
> ---
> v2:
>  - cc stable mailing list
>  fs/f2fs/segment.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] f2fs: init dirty_secmap incorrectly
@ 2020-11-30  7:37 Jack Qiu
  2020-11-30  8:11 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Qiu @ 2020-11-30  7:37 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: stable

section is dirty, but dirty_secmap may not set

Reported-by: Jia Yang <jiayang5@huawei.com>
Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section
has several segments")

Signed-off-by: Jack Qiu <jack.qiu@huawei.com>
---
v2:
 - cc stable mailing list
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 1596502f7375..f2a4265318f5 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4544,7 +4544,7 @@ static void init_dirty_segmap(struct f2fs_sb_info *sbi)
 		return;

 	mutex_lock(&dirty_i->seglist_lock);
-	for (segno = 0; segno < MAIN_SECS(sbi); segno += blks_per_sec) {
+	for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) {
 		valid_blocks = get_valid_blocks(sbi, segno, true);
 		secno = GET_SEC_FROM_SEG(sbi, segno);

--
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-02  1:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01  7:45 [PATCH] f2fs: init dirty_secmap incorrectly Jack Qiu
2020-12-02  1:52 ` [f2fs-dev] " Chao Yu
  -- strict thread matches above, loose matches on Subject: below --
2020-11-30  7:37 Jack Qiu
2020-11-30  8:11 ` Greg KH

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).