From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH] f2fs: fix double count on issued discard commands
Date: Sun, 10 Sep 2017 20:38:45 -0700 [thread overview]
Message-ID: <20170911033845.53701-1-jaegeuk@kernel.org> (raw)
If issue_cond is true, it does double count for # of issued commands.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
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)
--
2.14.0.rc1.383.gd1ce394fe2-goog
next reply other threads:[~2017-09-11 3:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 3:38 Jaegeuk Kim [this message]
2017-09-12 1:53 ` [f2fs-dev] [PATCH] f2fs: fix double count on issued discard commands Chao Yu
2017-09-12 3:53 ` Chao Yu
2017-09-12 4:29 ` Jaegeuk Kim
[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=20170911033845.53701-1-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).