Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2872043pxu; Mon, 7 Dec 2020 19:13:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2UMTkkUP7b48MdLilZFaLkkBALaaaHLuTnZ1EF81fTzD/mV7v+AXRFmL3ak1JGJ8UJfHP X-Received: by 2002:a17:906:3099:: with SMTP id 25mr21421374ejv.321.1607397187987; Mon, 07 Dec 2020 19:13:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607397187; cv=none; d=google.com; s=arc-20160816; b=0TfBoWXfm98BcbzNIbZLNJBUlzSQM11O9WH6hGpYGug4Tj0Jj4cMDdwzCXRNNsiGRZ 28Sid7kMhzUNMU2QLtdpsiWpjVmc0OVMNXOElP0Za3HjZfv6J5eggWUNb/1o7V+0Qycu kGLufAWdGaL07YF3l19iKhWpDo/ZReW2tygjZEKMMJRonmiPLQ6MWqLX3riR676/bkZe DYvQN6mnUPG3NDJGlOmu5HDddBWj637Nv/pIkuooUHBSqmUPGELj7ov1ygeMuwLG5Ij4 rvTtqQG5F5BPLGySG2a5Pj+ln5WeZE9XtbizOKHQbIYXH+hzjB8vhB+jcaRDceRLmC7c YiIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=OAPxyuiiJk+kuF4VfNpzI4cNiIzyVQqu/RdaPTZdLX0=; b=wtAYaVDXQevmIBPPs5i5ClPSvwVXnuuRLg54/YqAxTI8lFcI3jFmA7kNaxlqbbJ7mB HayqQbVMsArpoNNV011+hOG1WBklwpV7Tp7jsP/3F8Wwm8/ap2Qb9O1hihU2Ow0x/iVw m16Htjyr1mU+fvo+twzO/DWCG6dBCJq8+/mSfw8W2sPLTQ92juoyJvfgx6GL8nBiyzSS nMsptgG3zSGLJg83iVc0ZaqpLvA4Kdne32HPUyJACFUCrCYVfhawyGPhZfP8lrGIqMPJ 3LHonE5ldiBEyGvFbThq1uf2tYKv4X8ZfYAhnYvxncJ4iP551WDaMgZdPPfSYOHRz6MY wjdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o24si6885281ejm.674.2020.12.07.19.12.44; Mon, 07 Dec 2020 19:13:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726104AbgLHBKV (ORCPT + 99 others); Mon, 7 Dec 2020 20:10:21 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:9391 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725877AbgLHBKV (ORCPT ); Mon, 7 Dec 2020 20:10:21 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CqhsC00Hfz7B2B; Tue, 8 Dec 2020 09:09:02 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 8 Dec 2020 09:09:32 +0800 Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: compress: deny setting unsupported compress algorithm To: Eric Biggers CC: , , References: <20201207095609.73825-1-yuchao0@huawei.com> From: Chao Yu Message-ID: Date: Tue, 8 Dec 2020 09:09:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/8 2:16, Eric Biggers wrote: > On Mon, Dec 07, 2020 at 05:56:09PM +0800, Chao Yu wrote: >> If kernel doesn't support certain kinds of compress algorithm, deny to set >> them as compress algorithm of f2fs via 'compress_algorithm=%s' mount option. >> >> Signed-off-by: Chao Yu >> --- >> no changes, just rebase on dev branch. > > This doesn't apply to the dev branch anymore. Maybe you apply patches with wrong order? https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=dev > >> fs/f2fs/super.c | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c >> index e0fe72f1d2c8..662e59f32645 100644 >> --- a/fs/f2fs/super.c >> +++ b/fs/f2fs/super.c >> @@ -936,9 +936,14 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) >> if (!name) >> return -ENOMEM; >> if (!strcmp(name, "lzo")) { >> +#ifdef CONFIG_F2FS_FS_LZO >> F2FS_OPTION(sbi).compress_algorithm = >> COMPRESS_LZO; >> +#else >> + f2fs_info(sbi, "Image doesn't support lzo compression"); >> +#endif > > These info messages don't make sense. It's not the filesystem image that > doesn't support the algorithm, but rather the kernel that doesn't. > > Also, shouldn't these be warnings instead of "info"? Correct. > > - Eric > . >