Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp113064rwe; Tue, 23 Aug 2022 19:48:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR4NaI8kLdNItyBPyfNF2KhKqycpt2tzmekkVNbsNHCBlDLXgC/f/xNx16VXpUPgn7FMGhgR X-Received: by 2002:a05:6402:524e:b0:446:9ebb:7134 with SMTP id t14-20020a056402524e00b004469ebb7134mr5685108edd.284.1661309306408; Tue, 23 Aug 2022 19:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661309306; cv=none; d=google.com; s=arc-20160816; b=OiXBrJzz2RZt2Vm+J2SZDAt6+venctSdKiN7Ws+UGJStzOhJIDSrz1RZT9K115Mt5E e52jc19khlns800AHlXrGThoxM6PLVYuX8fl5h74O2okDOl7d7llefy+EjoSsho9g/ZA mDK1JwPeydcvcHbn5oLtMOl72kpckV5q8lmnb3RP9A/3EdQM+HGFkc6W4ZqU6ZProSwO vKgcD/VGCaAWMj7AHX1DLhQkI6Kv5loAlKYsvt6CmiEzxKC2IEIdgbWl1tVUs/OmZMag A8+DdywgbGvVqpErepyzOK6xoltlSe3zfV3OhNVK44+6q3f1rAmCdZE113Q4yy5yCb1V kZog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=KViMWwTMz0hHM/CO95GteLH5w6vtiDwThI8XfAlRhsw=; b=0zTraID46CPyvSAFDZGS3XmlwsEph5RTfrcM814C/Ze01IySuivVEtyxbnz9+F5Dz3 HmnTTLxTixbMecogtiXkxPJAusl5oQ04PXYAj7sBvAN8fbU7hLiHISzNd6APFFHkL4zB QPBqX22W6IfstluREridjz5qaQ4NU+vjc294JKf2pH46tbJT8DrvfxBerHbKmiQx6MUR 0fjdcd28dPYucfOXKijIT+EP7yqF92IDpscQgog61pQEfhdDG15xLK7b4+xMxVAj/8Hj WdO4tL1La5fsXK1iJoAPhbGjJvYM3Ksb6ZcUfUfTCazTrfCVe279pbjXauSe6FYJE/C8 2syg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TufyI7wC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc5-20020a056402204500b00447225766cfsi314551edb.535.2022.08.23.19.48.00; Tue, 23 Aug 2022 19:48:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TufyI7wC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233988AbiHXC05 (ORCPT + 99 others); Tue, 23 Aug 2022 22:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbiHXC0z (ORCPT ); Tue, 23 Aug 2022 22:26:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBF5986B64 for ; Tue, 23 Aug 2022 19:26:54 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id AB0E4B821B0 for ; Wed, 24 Aug 2022 02:26:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43180C433D6; Wed, 24 Aug 2022 02:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661308012; bh=Nav42ddGiLpWaB9oN10SoZfmDlr6BuD4LK5Oxn/MhMk=; h=Date:From:To:Subject:References:In-Reply-To:From; b=TufyI7wCRgTbbSTpo0Xi9ntkhTHjjIHMm0BlDkJNCellUCpmOADVv4YNAxiWP1WTj lhFKaDHoQsU4hgOYluZw75GL15EHQi11t4Gk9gtpqcoHO2Jow8Oe01n6GSfEOVHGYz MaiKnvomYv9mcrklaBK+ccnSqrIvXCikC9y0oiyM3iAG4SDlz0VmX0TjfXgWQiqgnH sqKuDmmiuzR81xUhIaFPNK+XXYCtp5VXJLkDKKZksRWQHiRfkWm7eK7llBTPDE0/+Q f/qWfjI7zzoVLgEOF4pioTCxE5OIfmYKCvTqADcDbdu7JJJrySfqR4D44SI9ylxkJU B3OwxRpYC9R4g== Date: Tue, 23 Aug 2022 19:26:50 -0700 From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH] f2fs: increase the limit for reserve_root Message-ID: References: <20220823172124.2285995-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220823172124.2285995-1-jaegeuk@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/23, Jaegeuk Kim wrote: > This patch increases the threshold that limits the reserved root space from 0.2% > to 12.5% by using simple shift operation. > > Typically Android sets 128MB, but if the storage capacity is 32GB, 0.2% which is > around 64MB becomes too small. Let's relax it. > Added: Reported-by: Aran Dalton Thanks, > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/super.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index 09972b709cdd..d1b4de5b4083 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -301,10 +301,10 @@ static void f2fs_destroy_casefold_cache(void) { } > > static inline void limit_reserve_root(struct f2fs_sb_info *sbi) > { > - block_t limit = min((sbi->user_block_count << 1) / 1000, > + block_t limit = min((sbi->user_block_count >> 3), > sbi->user_block_count - sbi->reserved_blocks); > > - /* limit is 0.2% */ > + /* limit is 12.5% */ > if (test_opt(sbi, RESERVE_ROOT) && > F2FS_OPTION(sbi).root_reserved_blocks > limit) { > F2FS_OPTION(sbi).root_reserved_blocks = limit; > -- > 2.37.1.595.g718a3a8f04-goog