Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728AbdGFNR3 (ORCPT ); Thu, 6 Jul 2017 09:17:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:45856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752399AbdGFNR1 (ORCPT ); Thu, 6 Jul 2017 09:17:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF5CB2156A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=chao@kernel.org Subject: Re: [PATCH] f2fs: no need to create issue_discard_thread if it exists To: Yunlong Song , jaegeuk@kernel.org, yuchao0@huawei.com, sylinux@163.com Cc: miaoxie@huawei.com, bintian.wang@huawei.com, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <1499339134-104480-1-git-send-email-yunlong.song@huawei.com> From: Chao Yu Message-ID: Date: Thu, 6 Jul 2017 21:16:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1499339134-104480-1-git-send-email-yunlong.song@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 670 Lines: 27 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; > } > >