Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1939847rwb; Fri, 11 Nov 2022 02:43:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf6FcSQo3sw4tTa/NjQg4iHspngDzLYJ8rKyXLa25rquRbJGfgjaIMdtLx7H5vr99uGC+Y8e X-Received: by 2002:a17:906:31d4:b0:78d:51c0:d4d1 with SMTP id f20-20020a17090631d400b0078d51c0d4d1mr1393535ejf.161.1668163405511; Fri, 11 Nov 2022 02:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668163405; cv=none; d=google.com; s=arc-20160816; b=YC7BsKKh3z+thHoFL8FTegDinB04xk8exquxe8joYdCE3ui4WtfhnU0Wl208uIOZ65 +Ox2hnwQNh85QUeDLFacVh8psBF8/DwKHuP1GlRsL5SaEC3cqwK0zAnuqg8JGcW/Yrfq HT46PzHsGzEQAYMs6kb6J/40LzQ84nP8VWmFQ+OLReUx5ddeGepv7cEicsMjnWDgEz0g 1q9veryPT3nTnDjRTGF0xlR4MmgoHbtC2EV/+TpZej5/NfEDeEphzwUcJjaUJobn3Yy3 DMcUcdhZh53vYWu7CBTKaR/WGwUjOaWdeoXAYCFA6/Y4aoymnUEmAbrwL53n7OJnQQKK c1pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0gTY9KVhY5koHJUIdOKwq52LX+CaJmjCAz+4zXMgK8w=; b=pjRXU2WSsNTmbIROBTqIGotqHZWfUM01jze0XKOQebzgIiKJMtcoRakHGltOimDZtC 5hggNWn0gDshDl5JwYkl849VSPLzk/24iVcS/sqYtsotCajkXfH9j/Re3M5q1QX2pdQ4 xn/0hHCaAJBJx4xUxmWmbZ4GdVUdRwR/pXzyKoNTmUqmkjSFTMo/XCGnr4d0elNFwGlC slNtvcA8E/bxDRb9eo5bpWbsk7KoVT/LxP6JysynX38FLTbrN5MWXTPEGX2Kk6Wv/wUy bPRdBC+gDCen8XAjElHRjIiZ6vO7t3NcDzaIM3gVykaOILhYUSEWWEM5jYPcLG4sVqgS /KIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KsszgdB7; 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 hz5-20020a1709072ce500b007adc5c4626bsi601198ejc.50.2022.11.11.02.43.02; Fri, 11 Nov 2022 02:43:25 -0800 (PST) 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=KsszgdB7; 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 S233057AbiKKKVq (ORCPT + 92 others); Fri, 11 Nov 2022 05:21:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233281AbiKKKV3 (ORCPT ); Fri, 11 Nov 2022 05:21:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7128A6455 for ; Fri, 11 Nov 2022 02:20:13 -0800 (PST) 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 26B6FB824A6 for ; Fri, 11 Nov 2022 10:20:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8F24C433D7; Fri, 11 Nov 2022 10:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668162010; bh=H24VoR2zC1k3+kqFjlp5MPLEwbVf7+X5dDwcpSo7+EI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KsszgdB7pc2dR9r72LEkZt5Qv6cK7FFB6YI9/EJ6BnSRUQHrMOXVJq7HCbjCLyo15 eIwo0LdwBJVDtEwvKWZ5Gwf4xhWhy8WGWEcLzWR+PX8j9ZsLu/ABGWmlgR7xlo3roE ZfSKx3/pS9VozjGmu9Wk7VmcTl8Cr9iHLr+EAsyQ7qChs1vDHUIh/PxeYP82EXO97u 4aUKTyHJjqKXasL7cks28hpA0oByCGypBjGVqNsO2IlNQRbKKzXXHDRgYGgN7AHx8d hfJmfqdCsteN7JRieA1Oa/9ZOGvley+vn+/KC/0OFScuPK/qPVZ//jZ5mbWSf+WeQC dvgF9oAwr7YFA== Message-ID: Date: Fri, 11 Nov 2022 18:20:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v2 1/2] f2fs: fix to enable compress for newly created file if extension matches Content-Language: en-US To: Sheng Yong , jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20221111100830.953733-1-shengyong@oppo.com> From: Chao Yu In-Reply-To: <20221111100830.953733-1-shengyong@oppo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 2022/11/11 18:08, Sheng Yong wrote: > If compress_extension is set, and a newly created file matches the > extension, the file could be marked as compression file. However, > if inline_data is also enabled, there is no chance to check its > extension since f2fs_should_compress() always returns false. > > This patch moves set_compress_inode(), which do extension check, in > f2fs_should_compress() to check extensions before setting inline > data flag. > > Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion") > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks,