Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2594641pxu; Mon, 7 Dec 2020 10:20:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvnPF6gVCtLB9iMU+OJuyKtcmRgBA/mQ2qxIv3tjVKdqHlVXlJvq79ffFsmnDupjQ3cD53 X-Received: by 2002:a17:906:40c1:: with SMTP id a1mr19773369ejk.520.1607365213135; Mon, 07 Dec 2020 10:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607365213; cv=none; d=google.com; s=arc-20160816; b=03BfmQiJNCvfiOMPKWnnDwU3JYHLjtA+ubM1ewmcIDoIYgvLZenJgU9QfDKpb/yOu0 s4nJveJChm4jNxX8OXQHefAQ5nhtJuhF9Yf4lfuFe5xPBkEydS2FzblD94YLDtRoZPkq CI+pm4XirQYY4GAtP3X3shfKR8S57Mt9BYSoAM9w81dTBm+b6YUcIp8UcA5NilXoo17S UcrNTUYgnnGy2qv7bttfYgOQ+hpNjvcPXHFAYclnZqAnxw9n5RX2TSVeUph2/N5ZiTiq vystriu6SGIsD5umHKquRIcrfhetxWZ8DFCuX6wTUDgyMNtzo64dibwftSWKmXLU+JMk 667w== 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:cc:to:from:dkim-signature:date; bh=XWch1CcUVJFQ8lKjEqn6cSVVNs3MN8Sn6hJ/XwLMzOY=; b=Z+VafgoBUWvcN70bNA/85Rs/Fjl2vjeKbxQh1PF30rWxhM0PMGwoQT2eWvrau4vmxm yZZ7JAykSAN/p8GdN7IZFXOKgAeIK2lsq0YQizckSSXshc0qKxHVv5Zxx958doHI5JVd 6AOuO7rPVoiFbQcgpt2Wwi5Y+OnWTA+FV46VXE3FwJRrHrsRL2DKNtP30p9/2o7tyUy8 w2QMh8obLxiU5FctV3aDW4Cy/LVFwzcvYJ51jXw4vLcU1gJcon02TQ5AxarYU1ZDRRNP FBEAjxinrlU7dhzhv1WhJcB5tX7AjZfBXHVy4nEEnH9lmuzVtKrU/U+b3luYlrMIETOO hN4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VRvuvDQV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si6724330edw.349.2020.12.07.10.19.49; Mon, 07 Dec 2020 10:20:13 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VRvuvDQV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726355AbgLGSRf (ORCPT + 99 others); Mon, 7 Dec 2020 13:17:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:57432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbgLGSRf (ORCPT ); Mon, 7 Dec 2020 13:17:35 -0500 Date: Mon, 7 Dec 2020 10:16:53 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607365015; bh=le8vfxceC05Tky48BN1v0WaIn5E3rrFNOOcF0AF1HL4=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=VRvuvDQVG1PXt8E3Pc3u2I3v3PG+NTgsIULlnokT5ZIij6isspvvrH9tQ9Pp57O8w MCZ2cx7Fcypat1dqvCbepSXIQOcD2uMmw4m1NpKiqaECFcbgeQPcc3dVy2+4bpsfKl BPK7YZkcDuvN1aIjYIVRPaWP4f3EsrSDjhsxn4cfsBR5NAuyNOlX3P1aAlGtWk7AgZ maZmLyldh4UpG8YVt+OH5Ifd5QxVz/QMGKUU7RZjdTMcXGeoIlI/w12ZELNlRjA1e8 URI1KhV4Sb94eNQRbeZN486oF3xVrrdi5aE93A/3qBNsyqOn6fxU7Lp6tg1WlwlHem ahSPnDha6IQrw== From: Eric Biggers To: Chao Yu Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH RESEND] f2fs: compress: deny setting unsupported compress algorithm Message-ID: References: <20201207095609.73825-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201207095609.73825-1-yuchao0@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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"? - Eric