Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8317779rwb; Wed, 23 Nov 2022 19:55:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mEfscc539dpleWrmYSTO0nCPqwkp67a30BjNgtEJsKKdEo6hhioPoYEiIARDYnk7izaZG X-Received: by 2002:a17:90a:1950:b0:20d:2f:709d with SMTP id 16-20020a17090a195000b0020d002f709dmr39720211pjh.40.1669262113014; Wed, 23 Nov 2022 19:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669262113; cv=none; d=google.com; s=arc-20160816; b=PBWJAueRyUhayTu5iIZ5XXlajaw97VNqtKJbBWL5ul0WuqVpR4ITbu7i0E8U6Qq7bd SdFwTAUxqMGAj8Wn8TVmK2uCEXD7aJpirSw2oVdbzLtpD5AO5DEzy47wVv5aHXzAiUPn Gwdea3fhjOcKdCoaHLV7bx/Ab0h9RkAPt7Mtw+Xgww4UL2cZuWFfGGoMHO0shg2dHaS7 tvknR+eum8A4C1x4vVC3bshqvHTp1WKtBgpptdbPHFp1md7BJ5g+EHawXqp9e5JbWuc9 Gd1HyD2GhadcU+JjFWb0J1nwDcy+dEWwBm7TIamnVGktmZKBU9tNcZi5qdilUL2X4G33 yqJA== 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=VKev0jQzTpfRiYlqyhMB/x5/P0962C4hsyFZd8JrjX4=; b=BBITOdrH6IguZ5Z59s67WolHYDzXCqy13MmWEZGMSzTQm+NJC+CBLjwko2O4jGdNWi qY1HNzw0AYeMiyjSfszXEIZZ4YcW2a39iDeWLHmDly7NdDw6w5MlN4EBlU5pTXwbasqu z8pecfDV1QW82fb8HxxND2n9oazuN7JsQRmrURetA73qo4w4PdRMwvPi0H65iv+bHvld 7cbn83ms3WSoFyLzIg07+P5hRQe+DL3NjSOQBj4WTizFTy2/I4uAQsMhs7kGDawcBY/E VkFaieRjQ2Pnz6xvYmHEio7GeD1PJ5CjB2fX/q4HJUej9z8jGnRCDxfV5r4A27RMK4Lj jvgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CC505dBp; 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 bf25-20020a656d19000000b0046edccffb8dsi256177pgb.535.2022.11.23.19.55.00; Wed, 23 Nov 2022 19:55:12 -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=CC505dBp; 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 S229536AbiKXCia (ORCPT + 88 others); Wed, 23 Nov 2022 21:38:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbiKXCi3 (ORCPT ); Wed, 23 Nov 2022 21:38:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D91175E3D9 for ; Wed, 23 Nov 2022 18:38:27 -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 53174B82698 for ; Thu, 24 Nov 2022 02:38:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 039B4C433C1; Thu, 24 Nov 2022 02:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669257505; bh=kqWpotENKxr+q1qoYeeXTTyZvtStzZg7ftMSFzg/1cg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CC505dBpTLU+XRjWvIr5EjVP6+gWE8fXNlarcdQd9/Hd7lUl4qFiOhJPiMUQQOH1t PXs6XFdBRS/9b2lSQIfiVD0xzhzX9KTL8QTwp6A6KH/GFEHqlChqX9B3W+tn3hDlga hb9EP7P9fSn8xGYJwSNqZ3xn670a7+BHjoP655Dmf30zqG5KoCfP8eR8yaAO7CtFF2 9PNdixDwV2HPHlu5BLQFOlAH6utV6qInG3IA0rHIxVwOs7CccGHVHyzIZeiwKdmxK0 kUy2G6JyBki75C725o0/GTZlRrBS9yMfzxjdWJLqqAJSGQrfLQsKIQN5SNtNB9V0Xf nfh2f9Sjl1BVg== Message-ID: <63c416b9-b5cc-7c7d-1dad-ef00d0512d93@kernel.org> Date: Thu, 24 Nov 2022 10:38:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v4] f2fs: fix to enable compress for newly created file if extension matches Content-Language: en-US To: Jaegeuk Kim , Sheng Yong Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20221115160155.1037163-1-shengyong@oppo.com> From: Chao Yu In-Reply-To: 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/24 5:29, Jaegeuk Kim wrote: >>> + if (S_ISDIR(inode->i_mode)) >>> + goto inherit_comp; >> >> Documentation/filesystems/f2fs.rst >> >> - Priority in between FS_COMPR_FL, FS_NOCOMP_FS, extensions: >> >> * compress_extension=so; nocompress_extension=zip; chattr +c dir; touch >> dir/foo.so; touch dir/bar.zip; touch dir/baz.txt; then foo.so and baz.txt >> should be compresse, bar.zip should be non-compressed. chattr +c dir/bar.zip >> can enable compress on bar.zip. >> >> It looks nocompress_extension has higher priority than flag inheriting? > > I think so. Hi Sheng, Jaegeuk, Yup, I guess I misunderstand the code. :) Thanks,