Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2893981pxu; Mon, 7 Dec 2020 20:11:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1ntAQ6A7g5rckbfuF4wTPs1BRL3Wrat2lZ17Z3xsMfJR7ncwdADs4mONTRlc4+tSwTDgS X-Received: by 2002:a17:906:524a:: with SMTP id y10mr1438615ejm.97.1607400712627; Mon, 07 Dec 2020 20:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607400712; cv=none; d=google.com; s=arc-20160816; b=m8xENJzrsh+hT7cyJgNBj8JtZ4FDz/U+mfyvDFLPGBDInEaOht3ee4dlj3IqGZqHoM 22y9vYvMHEjdMSkWoLv5tRQKohMZV32XyfzOfAIkCjTUSTLjCw2ZoNmu1yrSzcZmO47C ZiQJXEzRVDdQEJh2grNCHQuv2jhSC77Yn3g4t1AcVewkkYBAzcUaT5Q+P7pNd0hMnfp4 xZX6z01+42rRQAsi3IStVKX3Pbn5a0MYZRG5OPBOELUPxEuY7igElIKWGR8xViYBJrrz oWp4zPpNHNHP0gGeNs7XZJ+Zaaxz8cAXMjrduIrPxbS6aLeaERfKpIhCaThwtEBb9sI7 rRgA== 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:references:cc :to:from:subject; bh=mnRA/aKlusDt3UlTt+TCB31oe1Qen5WzvtAU0TV93C8=; b=Ib++XnYJzrAxi10nsM7L3RrvqW+M0cBBJ8INV27yQ/04mCLv2VGECzf4KlkXF2CRa/ BpbE0efr3Adyt/fCDSrNJ51SVFQWSsiqn2RSfhmcJklZ/oaN7Rdabpr/Gl9mFBDoLaGD kfxLixETEWeEsdu/1bZKXG4Ds43CAcQXst5OeEBirde0FyVhI0yGJHSsi3I32K5rlyIk fpkXjg9imCMCvHZSiN9YyD1xobJy2lVEarfGPLkW9sJ9PeFAhraSHAGWRvXyiyLOVlHC eutRxyi/FNb9RoVy4nYPMqi0PMzGKccv2ub5tBNcARfPVB4C9h0GI65ry0oIBNFr48uH xJew== 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 a13si9795881edq.317.2020.12.07.20.11.30; Mon, 07 Dec 2020 20:11:52 -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 S1726869AbgLHD3u (ORCPT + 99 others); Mon, 7 Dec 2020 22:29:50 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:9554 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbgLHD3u (ORCPT ); Mon, 7 Dec 2020 22:29:50 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cqly40jnnzM1G2; Tue, 8 Dec 2020 11:28:28 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.210) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 8 Dec 2020 11:29:04 +0800 Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: compress: deny setting unsupported compress algorithm From: Chao Yu To: Eric Biggers CC: , , References: <20201207095609.73825-1-yuchao0@huawei.com> Message-ID: <52d04313-4229-ba0c-657e-fa9dc2e2a500@huawei.com> Date: Tue, 8 Dec 2020 11:29:04 +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 9:09, Chao Yu wrote: > 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"? I use f2fs_info() in this patch to keep line with other logs, I will send another patch to use f2fs_warn() instead. > > Correct. > >> >> - Eric >> . >> > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > . >