mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>,
	<linux-f2fs-devel@lists.sourceforge.net>
Cc: <daehojng@gmail.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix double count on issued discard commands
Date: Tue, 12 Sep 2017 11:53:09 +0800	[thread overview]
Message-ID: <6209aa5a-4d45-ac2b-448a-4b405dfb25d1@huawei.com> (raw)
In-Reply-To: <b6550c76-448a-fa48-eef8-3abcc2835b30@huawei.com>

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. :(

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

  reply	other threads:[~2017-09-12  3:53 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 [this message]
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=6209aa5a-4d45-ac2b-448a-4b405dfb25d1@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=daehojng@gmail.com \
    --cc=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

all inboxes | Powered by JetHome®