Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7724FC64ED8 for ; Mon, 13 Feb 2023 10:00:39 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pRVdX-0007Oo-1p; Mon, 13 Feb 2023 10:00:38 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pRVdR-0007Oi-Np for linux-f2fs-devel@lists.sourceforge.net; Mon, 13 Feb 2023 10:00:33 +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: From:References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: 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=WKncZGlpRrnvzSzSWeZyVsXVUjNwvQiscrkxC7r1C2w=; b=bQ9CygBr/IVjbqHIX6/YPdi0Ys WJ+5KxMEOyLT5SkfrZecp6MGMgxDjU4vIV8Qnpx4Wm6xmHeQ9ZujeXZF35rW6bVbaHpjkrir3osn4 g/pB31i32lGZKdm0X7yjpXJE7WhAp3qqM+Iq43mn3rFQnZE2BCwMhnaWUg1VuTRgo42o=; 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:From:References:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: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=WKncZGlpRrnvzSzSWeZyVsXVUjNwvQiscrkxC7r1C2w=; b=EnawVUkUuMO1xuZEqX8D6GOGHy wlyIQOubJyOg50hWLFlbFwnHQXJ0spSs4gscbJ2aM58I64narD+dqvJ3BfIuvXfWP6zsrqpZxRgg9 4X7Be1pEnF+yoG9OHYbfODTIegpDz21n2BsNXKnJJexuwnPN9iRHz6nS2UisuYzMkV1s=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pRVdQ-002eGG-E2 for linux-f2fs-devel@lists.sourceforge.net; Mon, 13 Feb 2023 10:00:33 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C117460F68 for ; Mon, 13 Feb 2023 10:00:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F14E3C433EF; Mon, 13 Feb 2023 10:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676282423; bh=3MvVVqhAfCng96xTPtnaOvATbId5BKd06slhUFVEido=; h=Date:Subject:To:References:From:In-Reply-To:From; b=hAeLXQKv2KYgyz0BUWN9QbEEmoLe/yuFuO1D2SJ0s6fs01kP5mL9JqDK7DP3tvHz+ MVmiKkZTyrSjnPenBCIZHAUn7SfnTUveRv/8cf2jGojlzYjukZuiKlwu6su2cx/qLE aGgyYJ/90yzUeeTAdtpRQmnfVn+JRRIVhmCa7RXhbsygNVs6K2TMU4n/jPuqdIb1ke kVy6t8AhlYJPv6mL288l95EIkcJXg7M6mNiJT3b8tbY4VuxUgOTBqK1nFiFSR5qDJT hqFG3Z26wVRj/31wl1+6vYHy0kPDgkfirNDPtwWt4XgVIHFkeamsYua8I5NMcglBwK aUdS8/IpZTKew== Message-ID: Date: Mon, 13 Feb 2023 18:00:20 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Content-Language: en-US To: Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net References: <20230208212502.339427-1-jaegeuk@kernel.org> From: Chao Yu In-Reply-To: <20230208212502.339427-1-jaegeuk@kernel.org> X-Headers-End: 1pRVdQ-002eGG-E2 Subject: Re: [f2fs-dev] [PATCH] mkfs.f2fs: trim all the devices except the first one 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 2023/2/9 5:25, Jaegeuk Kim wrote: > We need to check the first disk only, and trim the other disks. I'm confused, why we don't need to trim first disk? Thanks, > > Signed-off-by: Jaegeuk Kim > --- > mkfs/f2fs_format_utils.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c > index 597c2b3a7b1c..448fbaa8866e 100644 > --- a/mkfs/f2fs_format_utils.c > +++ b/mkfs/f2fs_format_utils.c > @@ -129,6 +129,10 @@ static bool is_wiped_device(int i) > int nblocks = 4096; /* 16MB size */ > int j; > > + /* let's trim the other devices except the first device */ > + if (i > 0) > + return false; > + > buf = malloc(F2FS_BLKSIZE); > if (buf == NULL) { > MSG(1, "\tError: Malloc Failed for buf!!!\n"); _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel