From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F089C4338F for ; Wed, 11 Aug 2021 13:45:11 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E673260FD9; Wed, 11 Aug 2021 13:45:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E673260FD9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1mDoXd-0001rJ-KP; Wed, 11 Aug 2021 13:45:09 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDoXc-0001r9-Ft for linux-f2fs-devel@lists.sourceforge.net; Wed, 11 Aug 2021 13:45:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sr64JLl36/X73+XCVLVEdCH0eGrLg1a31S+ZCuK7O6Q=; b=Gq32tOXvv14yHXBIhJWcwS9Lbe 9S58DNoTCWySiXW8+BJfX31AAv9hBg2ioks1J6aKlB44CE69H5GLywu7jBQhcJ9BIFC4Bnr6YoIqv fzypDBWy+NYWpM9+Tm4gBCrGyJMaedGQI50UEShOsr4NVN81HBTFwQVbtFLQGGcs864o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sr64JLl36/X73+XCVLVEdCH0eGrLg1a31S+ZCuK7O6Q=; b=QpzWl559p+d61NH+c8nvZWi+S8 iN1v2V+2ygKwJn4Plgi9H0FAxWtB/vnbmDMSqbKZ4hT66+5P6ir70E2a+9ZJ5Q9sUZX3qR7LpAT2j rDLs6v5npwcEqGdYPWFWTdoOzA4/Aex6WrVhem/NkKXRvxJkfUsSiLBLtg/136AjcC4U=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mDoXb-0007pB-DZ for linux-f2fs-devel@lists.sourceforge.net; Wed, 11 Aug 2021 13:45:08 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 839D160FA0; Wed, 11 Aug 2021 13:44:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628689496; bh=O8JVrrpaXEdBnuTdYmtvCs5et+qsGlYfUIcqodvrCBE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Yz74ZQLD53yvkil+NzYu2wm3YsMgcxktWknb8nC7AEKeFG+yvFgCXFTDUs5rfsBDd yqnZsm6sPsP1EozaxLn+8Jt+VHw92MXkVjbH2/DAIbQOg50bL5X+w6q8CJvfy1wkCf GcyHHEv+UJhch2vE+bF7sHp7tXcPNGWOi67HfjLYl3u68dAJVZecROITNUuaa0E1V5 AyfTOt0kpDt3Cnd2lLtVLESeJvmOoBapYUtkGlnQgKsvDZGs55Vm791r7iqHtUDZP9 HzTHVe//INUnEATMvKlWoYqUU5AS421qKZw/ws8VmQ28owyJt9qZPjMl+Ju/mXwHWB 5MS3U4BQPRfAA== To: Yangtao Li , jaegeuk@kernel.org References: <20210811131826.223141-1-frank.li@vivo.com> <20210811131826.223141-2-frank.li@vivo.com> From: Chao Yu Message-ID: Date: Wed, 11 Aug 2021 21:44:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210811131826.223141-2-frank.li@vivo.com> Content-Language: en-US X-Headers-End: 1mDoXb-0007pB-DZ Subject: Re: [f2fs-dev] [PATCH 2/2] fs: Don't create discard thread when device not support realtime discard X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Fengnan Chang , linux-f2fs-devel@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 2021/8/11 21:18, Yangtao Li wrote: > From: Fengnan Chang > > Don't create discard thread when device not support realtime discard. > > Signed-off-by: Fengnan Chang > Signed-off-by: Yangtao Li > --- > fs/f2fs/segment.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index 363779a4402d..bc4ac46f3041 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -2161,6 +2161,8 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi) > init_waitqueue_head(&dcc->discard_wait_queue); > SM_I(sbi)->dcc_info = dcc; > init_thread: > + if (!f2fs_realtime_discard_enable(sbi)) How about below case: - mount -o nodiscard - mount -o remount,discard Thanks, > + return err; > dcc->f2fs_issue_discard = kthread_run(issue_discard_thread, sbi, > "f2fs_discard-%u:%u", MAJOR(dev), MINOR(dev)); > if (IS_ERR(dcc->f2fs_issue_discard)) { > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel