All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sahitya Tummala <stummala@codeaurora.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Chao Yu <yuchao0@huawei.com>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, stummala@codeaurora.org
Subject: Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress
Date: Mon, 20 Apr 2020 17:07:05 +0530	[thread overview]
Message-ID: <20200420113705.GF20234@codeaurora.org> (raw)
In-Reply-To: <20200417161516.GA17901@google.com>

Hi Jaegeuk,

On Fri, Apr 17, 2020 at 09:15:16AM -0700, Jaegeuk Kim wrote:
> Hi Sahitya,
> 
> Could you please test this patch fully? I didn't test at all.

I have tested v5 and so far found only one problem where MAIN_SECS(sbi)
isn't updated properly. Fixed it as below.

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 603f195..a5166b1 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1450,7 +1450,7 @@ static int free_segment_range(struct f2fs_sb_info *sbi,
                f2fs_bug_on(sbi, 1);
        }
 out:
-       MAIN_SECS(sbi) -= secs;
+       MAIN_SECS(sbi) += secs;
        return err;
 }

I will let you know in case anything else shows up later.

Thanks,

> 
> Thanks,
> 
> On 04/17, Chao Yu wrote:
> > On 2020/4/17 5:40, Jaegeuk Kim wrote:
> > > On 04/14, Jaegeuk Kim wrote:
> > >> On 04/13, Jaegeuk Kim wrote:
> > >>> On 04/03, Jaegeuk Kim wrote:
> > >>>> On 04/03, Jaegeuk Kim wrote:
> > >>>>> On 04/01, Sahitya Tummala wrote:
> > >>>>>> Hi Jaegeuk,
> > >>>>>>
> > >>>>>> Got it.
> > >>>>>> The diff below looks good to me.
> > >>>>>> Would you like me to test it and put a patch for this?
> > >>>>>
> > >>>>> Sahitya, Chao,
> > >>>>>
> > >>>>> Could you please take a look at this patch and test intensively?
> > >>>>>
> > >>>>> Thanks,
> > > 
> > > v5:
> > >  - add signal handler
> > > 
> > > Sahitya raised an issue:
> > > - prevent meta updates while checkpoint is in progress
> > > 
> > > allocate_segment_for_resize() can cause metapage updates if
> > > it requires to change the current node/data segments for resizing.
> > > Stop these meta updates when there is a checkpoint already
> > > in progress to prevent inconsistent CP data.
> > > 
> > > Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
> > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > 
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> > 
> > Thanks,

-- 
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

WARNING: multiple messages have this Message-ID (diff)
From: Sahitya Tummala <stummala@codeaurora.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress
Date: Mon, 20 Apr 2020 17:07:05 +0530	[thread overview]
Message-ID: <20200420113705.GF20234@codeaurora.org> (raw)
In-Reply-To: <20200417161516.GA17901@google.com>

Hi Jaegeuk,

On Fri, Apr 17, 2020 at 09:15:16AM -0700, Jaegeuk Kim wrote:
> Hi Sahitya,
> 
> Could you please test this patch fully? I didn't test at all.

I have tested v5 and so far found only one problem where MAIN_SECS(sbi)
isn't updated properly. Fixed it as below.

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 603f195..a5166b1 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1450,7 +1450,7 @@ static int free_segment_range(struct f2fs_sb_info *sbi,
                f2fs_bug_on(sbi, 1);
        }
 out:
-       MAIN_SECS(sbi) -= secs;
+       MAIN_SECS(sbi) += secs;
        return err;
 }

I will let you know in case anything else shows up later.

Thanks,

> 
> Thanks,
> 
> On 04/17, Chao Yu wrote:
> > On 2020/4/17 5:40, Jaegeuk Kim wrote:
> > > On 04/14, Jaegeuk Kim wrote:
> > >> On 04/13, Jaegeuk Kim wrote:
> > >>> On 04/03, Jaegeuk Kim wrote:
> > >>>> On 04/03, Jaegeuk Kim wrote:
> > >>>>> On 04/01, Sahitya Tummala wrote:
> > >>>>>> Hi Jaegeuk,
> > >>>>>>
> > >>>>>> Got it.
> > >>>>>> The diff below looks good to me.
> > >>>>>> Would you like me to test it and put a patch for this?
> > >>>>>
> > >>>>> Sahitya, Chao,
> > >>>>>
> > >>>>> Could you please take a look at this patch and test intensively?
> > >>>>>
> > >>>>> Thanks,
> > > 
> > > v5:
> > >  - add signal handler
> > > 
> > > Sahitya raised an issue:
> > > - prevent meta updates while checkpoint is in progress
> > > 
> > > allocate_segment_for_resize() can cause metapage updates if
> > > it requires to change the current node/data segments for resizing.
> > > Stop these meta updates when there is a checkpoint already
> > > in progress to prevent inconsistent CP data.
> > > 
> > > Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
> > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > 
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> > 
> > Thanks,

-- 
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2020-04-20 11:37 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 10:36 [PATCH] f2fs: prevent meta updates while checkpoint is in progress Sahitya Tummala
2020-03-26 10:36 ` [f2fs-dev] " Sahitya Tummala
2020-03-27 19:24 ` Jaegeuk Kim
2020-03-27 19:24   ` [f2fs-dev] " Jaegeuk Kim
2020-03-28  8:38   ` Chao Yu
2020-03-28  8:38     ` [f2fs-dev] " Chao Yu
2020-03-30  8:40     ` Sahitya Tummala
2020-03-30  8:40       ` [f2fs-dev] " Sahitya Tummala
2020-03-30 18:34       ` Jaegeuk Kim
2020-03-30 18:34         ` [f2fs-dev] " Jaegeuk Kim
2020-03-31  0:58 ` Chao Yu
2020-03-31  0:58   ` [f2fs-dev] " Chao Yu
2020-03-31  3:54 ` Jaegeuk Kim
2020-03-31  3:54   ` [f2fs-dev] " Jaegeuk Kim
2020-03-31  9:06   ` Sahitya Tummala
2020-03-31  9:06     ` [f2fs-dev] " Sahitya Tummala
2020-03-31 18:43     ` Jaegeuk Kim
2020-03-31 18:43       ` [f2fs-dev] " Jaegeuk Kim
2020-04-01  2:54       ` Chao Yu
2020-04-01  2:54         ` [f2fs-dev] " Chao Yu
2020-04-03 16:20         ` Jaegeuk Kim
2020-04-03 16:20           ` [f2fs-dev] " Jaegeuk Kim
2020-04-01  5:08       ` Sahitya Tummala
2020-04-01  5:08         ` [f2fs-dev] " Sahitya Tummala
2020-04-03 17:17         ` Jaegeuk Kim
2020-04-03 17:17           ` [f2fs-dev] " Jaegeuk Kim
2020-04-03 17:27           ` Jaegeuk Kim
2020-04-03 17:27             ` Jaegeuk Kim
2020-04-07  2:34             ` Chao Yu
2020-04-07  2:34               ` Chao Yu
2020-04-07  2:58               ` Jaegeuk Kim
2020-04-07  2:58                 ` Jaegeuk Kim
2020-04-07  3:21                 ` Chao Yu
2020-04-07  3:21                   ` Chao Yu
2020-04-09  2:25                   ` Jaegeuk Kim
2020-04-09  2:25                     ` Jaegeuk Kim
2020-04-13 17:42             ` Jaegeuk Kim
2020-04-13 17:42               ` Jaegeuk Kim
2020-04-14  9:58               ` Sahitya Tummala
2020-04-14  9:58                 ` Sahitya Tummala
2020-04-14 11:44               ` Chao Yu
2020-04-14 11:44                 ` Chao Yu
2020-04-14 13:44               ` Jaegeuk Kim
2020-04-14 13:44                 ` Jaegeuk Kim
2020-04-16  7:04                 ` Chao Yu
2020-04-16  7:04                   ` Chao Yu
2020-04-16 21:40                 ` Jaegeuk Kim
2020-04-16 21:40                   ` Jaegeuk Kim
2020-04-17  7:26                   ` Chao Yu
2020-04-17  7:26                     ` Chao Yu
2020-04-17 16:15                     ` Jaegeuk Kim
2020-04-17 16:15                       ` Jaegeuk Kim
2020-04-20 11:37                       ` Sahitya Tummala [this message]
2020-04-20 11:37                         ` Sahitya Tummala
2020-04-20 15:52                         ` Jaegeuk Kim
2020-04-20 15:52                           ` Jaegeuk Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420113705.GF20234@codeaurora.org \
    --to=stummala@codeaurora.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.