From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, daehojng@gmail.com
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix double count on issued discard commands
Date: Mon, 11 Sep 2017 21:29:16 -0700 [thread overview]
Message-ID: <20170912042916.GA95671@jaegeuk-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <6209aa5a-4d45-ac2b-448a-4b405dfb25d1@huawei.com>
On 09/12, Chao Yu wrote:
> On 2017/9/12 9:53, Chao Yu wrote:
> > On 2017/9/11 11:38, Jaegeuk Kim wrote:
> >> If issue_cond is true, it does double count for # of issued commands.
> >>
> >> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> >
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
>
> As Daeho Jeong mentioned, the change makes 'iter > DISCARD_ISSUE_RATE' dead
> code, I just misread iter and issued variable, sorry. :(
Yeah, that's exactly like what I made a mistake before.
I should have mentioned that earlier. :)
>
> Thanks,
>
> >
> >> ---
> >> 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 7fd742f747ce..25196ff5d587 100644
> >> --- a/fs/f2fs/segment.c
> >> +++ b/fs/f2fs/segment.c
> >> @@ -1087,7 +1087,7 @@ static int __issue_discard_cmd(struct f2fs_sb_info *sbi, bool issue_cond)
> >> issued++;
> >> __submit_discard_cmd(sbi, dc);
> >> }
> >> - if (issue_cond && iter++ > DISCARD_ISSUE_RATE)
> >> + if (issue_cond && iter > DISCARD_ISSUE_RATE)
> >> goto out;
> >> }
> >> if (list_empty(pend_list) && dcc->pend_list_tag[i] & P_TRIM)
> >>
> >
> >
> >
next prev parent reply other threads:[~2017-09-12 4:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 3:38 Jaegeuk Kim
2017-09-12 1:53 ` [f2fs-dev] " Chao Yu
2017-09-12 3:53 ` Chao Yu
2017-09-12 4:29 ` Jaegeuk Kim [this message]
[not found] ` <CGME20170912042935epcas1p4630737028cc7b9536a0c688c92084e84@epcms1p7>
2017-09-12 4:34 ` Daeho Jeong
2017-09-12 17:11 ` Jaegeuk Kim
2017-09-13 7:13 ` Chao Yu
[not found] ` <CGME20170912042935epcas1p4630737028cc7b9536a0c688c92084e84@epcms1p8>
2017-09-13 8:48 ` Daeho Jeong
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=20170912042916.GA95671@jaegeuk-macbookpro.roam.corp.google.com \
--to=jaegeuk@kernel.org \
--cc=daehojng@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®