Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753267AbdGGCDO (ORCPT ); Thu, 6 Jul 2017 22:03:14 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9805 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753045AbdGGCDN (ORCPT ); Thu, 6 Jul 2017 22:03:13 -0400 Subject: Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists To: Chao Yu , , , References: <1499339134-104480-1-git-send-email-yunlong.song@huawei.com> CC: , , , , From: Yunlong Song Message-ID: <595EEBA2.8070406@huawei.com> Date: Fri, 7 Jul 2017 10:02:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.74.205] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.595EEBD1.0018,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c045024ac7737fa1226e835ab8714cd4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 38 It's fine unless create_discard_cmd_control is used in remount flow in the future. On 2017/7/6 21:16, Chao Yu wrote: > Hi Yunlong, > > It looks there is no way to create discard thread redundantly, > so here we don't need to check this? > > Thanks, > > On 2017/7/6 19:05, Yunlong Song wrote: >> Signed-off-by: Yunlong Song >> --- >> fs/f2fs/segment.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c >> index 4c246e3..b48d004 100644 >> --- a/fs/f2fs/segment.c >> +++ b/fs/f2fs/segment.c >> @@ -1417,6 +1417,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi) >> >> if (SM_I(sbi)->dcc_info) { >> dcc = SM_I(sbi)->dcc_info; >> + if (dcc->f2fs_issue_discard) >> + return err; >> goto init_thread; >> } >> >> > . > -- Thanks, Yunlong Song